背景
background (内部样式表: <style> 下文内容 </style>)
单样式
1.背景颜色
background-color:#fff;
2.背景图片
background-image:url(images/1.jpg);
3.背景平铺
background-repeat:no repeat; 不平铺
repeat-x; 沿x轴平铺
repeat-y; 沿y轴平铺
repeat: 沿x、y轴平铺
4.背景定位
background-position:10px 10px; 沿x轴右移10px、沿y轴下移10px
center 10px; 沿x轴居中,沿y轴下移10px
沿x轴 left/right/center 均可
沿x轴 top/bottom/center 均可
5.背景滚动
background-attachment:scroll; 随滚动条滚动
fixed; 固定在页面可视范围内
复合样式
background:red url(images/1.jpg) no-repeat center top scroll;
颜色相关 图片相关
---恢复内容结束---