So: 1 comments must be added, in order to develop a better understanding of our code, to prevent them from looking back at us
2 The order of CSS style does not affect the display effect, but it is best to follow the specifications of Bootstrap, the later can be better maintenance
CSS Property declaration order:
1. Positioning (Positional properties)
2. Box model (box models properties)
3. Typographic (Typesetting properties)
4. Visual (Display properties)
For example:
. declaration-order {
/* Positioning */
Position:absolute;
top:0;
right:0;
bottom:0;
left:0;
z-index:100;
/* Box-model */
Display:block;
Float:right;
width:100px;
height:100px;
/* Typography */
Font:normal 13px "Helvetica Neue", Sans-serif;
line-height:1.5;
Color: #333;
Text-align:center;
/* Visual */
Background-color: #f5f5f5;
border:1px solid #e5e5e5;
border-radius:3px;
Overflow:hidden;
/* Misc */
Opacity:1;
}
CSS Authoring Specification