- #box
- { width:400px;
- height:200px;
- background-color:#5ee3e5; }
- 属性:属性值
- background 背景
- repeat 默认重复 background:blue url(xx.jpg)
- no-repeat 不重复background:blue url(xx.jpg) no-repeat
- repeat-x 横向重复
- repeat-y 纵向重复
- 向右(左)移动向下(上)移动background:blue url(xx.jpg) no-repeat (-)**px (-)**px
- center center 水平居中 垂直居中
- fixed 固定
- 背景background拥有复合属性,属性间无顺序,加空格即可识别。
来源: http://www.bubuko.com/infodetail-1971502.html