background样式 background-image: url("a.jpg"); /默认状态下是平铺的/ background-repeat: no-repeat; /背景不平铺/ background-color: red; /背景图片比背景颜色层级高/ background-repeat: repeat-x; /背景水平平铺/ background-repeat: repeat-y; /背景垂直平铺/ background-position: 10px 10px; /背景定位/ 第一个参数水平,第二个参数垂直 left、center、right top、center、bottom
background-attachment: fixed; /背景固定/ background-attachment: scroll; /默认样式滚动/ 合写 background: red url("a.jpg") no-repeat center center;