css 推荐属性书写顺序

  1. Positioning: 定位属性
  2. Box model: 盒子模型
  3. Typographic: 文本属性
  4. Visual: 视觉属性
  5. Other: 其他
.classname { 
  /* Positioning */
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;

  /* Box-model */
  display: block;
  float: right;
  width: 100px;
  height: 100px;
  padding: 20px;

  /* 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;

  /* Other */
  opacity: 1;
}

猜你喜欢

转载自www.cnblogs.com/icecream-lling/p/11528307.html
今日推荐