Web page production specification using DIV+CSS naming rules, can improve the efficiency of optimization, especially when team cooperation can provide cooperation in the production of efficient, specific div CSS naming rules css naming
Css specifications and css naming rules
1. File[Recommended] CSS files are encoded using a UTF-8 without BOM.Explanation:UTF-8 coding has wider adaptability. BOM (byte order mark) may cause unnecessary interference when processing files using programs or tools.Extension:Http://www.zhihu.com/question/20167122
2. indent
classification, divided into common,layout, convenient further modification, As for common, you can put font,color some common styles.There is no perfect life, there is no perfect person, so there is no perfect file naming, only try to do with the HTML layout, and then re-examine from each project, summary, all roads through Rome, can catch the mouse is a good cat.Name of CSS selector:Standardizing the nam
Http://www.blog.ce.cn/sp1/zhangnan/14493583725.shtml
CSS naming Rules use English letters, numbers, and underscores (usually in lower case.
I. Short
The abbreviation is mainly used to simplify writing and reduce Code to increase the download speed of webpages. Not all CSS can be abbreviated as below.
(1) font
Font-weight: bold;Font-style: italic;Font-varient: Sma
The standard use of DIV+CSS naming rules in Web page production can improve the efficiency of optimization, especially when teamwork can provide cooperative productionWhen we develop the DIV+CSS Web page (Xhtml), the more confused and tangled thing is the CSS naming , especi
CSS specifications and css naming rules
The selector, attribute, and value are all in lower case.All labels, attributes, and values are in lower case in the xhtml standard, as is CSS.Write a selector definition in a single rowIt facilitates selector searching and reading, and inserts and edits new selector to facilitate module identification. Remove unnecessary s
Defining IDs in XHTML, Classs are all used, mainly the aspect CSS defines the style to be able to wear at a glance. So, CSS naming is for reference only.
(1) Page structure class
Container: Container
Page Header: Header
Content: Content/container
Page body: Main
Page End: Footer
Navigation: Nav
Sidebar: Sidebar
conflict? We can avoid conflicts by naming them. CSS naming conventions can be: Camel nomenclature and the name of the dashes. Camel nomenclature: Starting with the second word, capitalize the first letter of each word. such as Dropmenu, Subnavmenu. The name of the line: With the underscore-, or underline _ delimited,
example, border: 1px solid red; border-width is related to the box model, but border-color is decorative. How to organize it?2. Should color, background, border-color, and other color-related items be included in the skin swap function? To facilitate future modification.3. What should I do with hacks? Put it at the end of the css file, or is it close to the hack attribute?4. How do I comment out newly added or modified attributes when maintaining my
border-width is related to the box model, but the border-color is decorative. How is it organized?2. Considering the skin-changing function, should I put a color, background, border-color and other colors in a piece? To facilitate later modification.3. How do I handle hacks? Do you put it in the last side of the CSS file, or with the properties of hack next to each other?4. How do I annotate a newly added or modified property while maintaining a coll
syntax and Selector priority
Selector type:① Tag name selector ② ID name selector ③ class selector ④ descendant Selector⑤ Group selector ⑥ pseudo-class selector 7 attribute selector wildcard character generator child SelectorSelector priority:① Priorities of different CSS import methods: label embedded style> header Writing Style> external reference st
I. Description of naming rules:-TOP
1), all the names are preferably lowercase2), the value of the attribute must be enclosed in double quotation marks (""), and must have values such as class= "DIVCSS5", id= "DIVCSS5"3), each label must have the beginning and the end, and must have the correct level, the layout has the regularity neatly4), empty element to have the end of the tag or after the beginning of
Good naming rules can contribute to the Cooperative Development of teams, and play a crucial role in both project development and product maintenance. It should be said that naming conventions are a convention and a bridge of good communication between programmers.
Naming rules:
Logon entry: loginbarLogo: logoSidebar:
Bem is a very useful, powerful and simple naming convention.It makes the front-end code easier to read and understand, easier to collaborate, easier to control, more robust and clear and more rigorous, and easier to maintain code.BEM Naming ideas:. block{}.block__element{}.block--modifier{}. Block{}. block__element{}. block--modifier{ } Copyright belongs to the author.Commercial reprint please contact
; block is just one of our processing units, it can contain other blocks. Then another concept, "element", is going to be made, and the Block is, of course, its element. Obviously, Element is dependent on the existence of a Block. Modifier is a simple rewrite of some of the properties of a block.The weight of the heavy! From the CSS code, we can see that element and modifier belong to block! Where do you see that coming from? Named! Well, it's just a
DIV + CSS standard naming set, divcss standard set
When we develop CSS + DIV web pages (Xhtml), the confusing and tangled thing is CSS naming. In particular, it is a good way for new users to know where to name and how to name them.Naming rules:
1) It is recommended that all
Recently worked with programmers on projects. My headers are all big ~ Complaining that my CSS name cannot be understood ~ You have to follow him. As a result, I opened his page and looked at it. The first one from the beginning was contentCommon, and the following were all content ****. I explained my reasons. After half a meeting, I seemed to accept it, but suddenly said, "Don't use the H tag! Also, do not use UL to define navigation and so
Description of the naming rules:1), all the names are preferably lowercase2), the value of the attribute must be enclosed in double quotation marks (""), and must have values such as class= "DIVCSS5", id= "DIVCSS5"3), each label must have the beginning and the end, and must have the correct level, the layout has the regularity neatly4), empty element to have the end of the tag or after the beginning of the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.