背景图像,背景颜色,背景图像的起始位置,是否重复。
工具/原料
电脑,DW软件
方法/步骤
1
背景图像:background-imageurl(路径) 指图像路径none 默认,不显示背景图像
2
背景图像是否重复(平铺):background-repeatrepeat 默认,背景图像将在垂直方向和水平方向重复repeat-x 背景图像在水平方向重复repeat-y 背景图像在垂直方向重复no-repeat 背景图像仅显示一次
3
背景图像的起始位置:background-positiontop (left上左,center上中,right上右)center(left中左,center居中,right中右)bottom(left下左,center下中,right下右)(单位像素px/百分号%)
4
背景图像随页面其余部分滚动:background-attachmentscroll 默认,背景图像会随页面其余部分滚动而移动fixed 当页面其余部分滚动时,背景图像不会移动
5
背景图像简写:background:颜色 url(图像路径) 重复 起始位置 滚动;举例说明:background:#0f0 url(dengji_vip.png) no-repeat top left fixed;
6
- 列表一
- 列表二
- 列表三
- 列表四
- 列表五
- 列表六
注意事项
建议使用简写方式