CSS编写规范


所以:1 注释一定是要加的,为了开发人员更好的看懂咱们的代码,防止他们再回头问咱们
          2 CSS样式的顺序虽然不影响显示效果,但是最好谨遵bootstrap的规范走,后期能更好的维护
         Css属性声明顺序:
             1. Positioning(定位属性)
             2. Box model(盒模型属性)
             3. Typographic(排版属性)
             4. Visual(显示属性)
           

 例如:
.declaration-order {
  /* Positioning */
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
 
  /* Box-model */
  display: block;
  float: right;
   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;
}
原文地址:https://www.cnblogs.com/qdmaomao/p/4601727.html