CSS声明顺序

1.Positioning

   定位 ,从正常的文档流中移除元素,还能覆盖盒模型

2.Box model

   盒模型, 决定组件的尺寸和位置

3.Typographic

  文本设置,只是影响组件的内部(inside)

4.Visual

  视觉效果,背景颜色,只是影响组件的内部(inside)


5.Other

   手势操作等

.box{
  // Positioning
  position: relative;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index:100;

  // Box model
  display: block;
  box-sizing: border-box;
  width: 100px;
  height: 100px;
  padding: 10px;
  border: 1px solid #ccc;
  margin: 10px;
  float: left;
  overflow: hidden;

  // Typographic
  font: normal 13px ;
  line-height: 30px;
  text-align: center;

  // Visual
  background: #E6E6E6;
  color: #ccc;
  opacity: .8;

  //Other
  cursor: pointer;

}

猜你喜欢

转载自blog.csdn.net/memoryI/article/details/88122186
今日推荐