背景颜色
background-color: #ccc;
背景图片
background-image:url(img/test.jpg); /* 默认状态下,背景会平铺 */
设置背景是否平铺
background-repeat: no-repeat; | repeat-x; | repeat-y; | repeat;
背景定位
background-position:100px 20px;
/*
背景定位:x y 三种方法
100px 20px
10% 20%
left | center | right top | center | bottom*/
设置背景是否跟随滑轮滚动
background-attachment: fixed; | scroll;
复合样式
background: #ccc url(img/2.jpg) no-repeat 100px 20px fixed;