1, the order attribute
We recommend the following order:
- Layout positioning properties: display / position / float / clear / visibility / overflow
- 自身属性:width / height / margin / padding / border / background
- Text attributes: color / font / text-decoration / text-align / vertical-align / white- space / break-word
- 其他属性(CSS3):content / cursor / border-radius / box-shadow / text-shadow / background:linear-gradient …
.demo {
display: block;
position: relative;
float: left;
width: 100px;
height: 100px;
margin: 0 10px;
padding: 20px 0;
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
color: #333;
background: rgba(0,0,0,.5);
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-o-border-radius: 10px;
-ms-border-radius: 10px;
border-radius: 10px;
}
Attribute Order mozilla official recommendation
2, CSS3 browser private prefix wording
CSS3 browser private prefix in front, after the standard prefixes
.demo {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-o-border-radius: 10px;
-ms-border-radius: 10px;
border-radius: 10px;
}
More private prefixed writing about browsers: # Vendor-specific Extensions