如何命名CSS文件及样式规范更利于SEO优化

坚持使用统一的CSS命名规则和养成习惯,可以使您更容易维护和修改您之前写过的CSS代码,从而提高您的工作效率。
它还可以增强搜索引擎的SEO优化并促进内存。
那么,我们如何以有序的方式命名CSS呢? 1 CSS文件和样式首先命名,让我们向您展示一些CSS文件和样式的命名示例,因为这些名称可以使每个人立即立即理解已定义的文件,如下所示:(1 )CSS文件命名命名全局样式:global.css framework layout:layout.css fort.css font style:font.css siles:link.c s siles:link.cls siles:links styles:link.s sirs:link stily:link stily:link stily:link.c sim:lind styles:link.c sim sim oint.c int.c sin。
columns.css主题:themes.css(2 ),CSS样式命名规格。
对于CSS样式的命名规则,建议使用字母,_数字, - 数字和数字。
它必须从字母开始,不能是纯数字。
为了方便开发样式名称管理,请使用有意义的单词或缩写组合来命名它,以便同事可以了解此样式的哪一部分,这可以节省寻找样式的时间。
例如:使用头部样式的标头,header_left或header_l可以在头部左侧使用。
如果是列结构,则可以像这样-Box_1 of3 (三列的第一列),Box_2 Of3 (三列的第二列),Box_3 Of3 (三列的第三列),我不会给其他一个示例。
只需按照上述规则命名。
The following lists some commonly used naming words for your convenience (in the future, everyone slowly shared the words they accumulated during their work, and their lives will be more unified, and there will be no one meaning or multiple words): Container: container/box Header: header main navigation: mainNav Sub-navigation: subNav Top navigation: topNav side navigation: sidebar left navigation: leftsideBar Right navigation: rightsideBar Website logo: logo h3 advertisement: banner page middle: mainBody Whole page: content bottom: footer menu: menu menu content: menuContent sub-menu: subMenu sub-menu content: subMenu Content search: search keyword search range: range tag text: tagTitle tag Tag content: tagContent Current tag: tagCurrent/currentTag Title: title Content: content list: list Current location: currentPath Sidebar: icon comment: note Login: login Registration: register BreadCrumb (即页面位置的导航提示)列定义:列_1 of3 (三列的第一列),列_2 of3 (三列的第二列),列_3 of3 (三列的第三列)2 css Priority inline inline样式> id selector> id selector> ID Selector> style(类),pseudo-class和pseudo-class and属于ober>类别> - 类型),pseory> typey> typey(pseory> typeore>) (伪元素)。
博客记录: *内联样式:元素的样式属性,例如