列表前样式属性
- 定义列表符合样式list-style-type:none去掉符号 disc 实心 circle空心 square实心方块
- 列表前边用图片符号list-style-image:url(图片地址)
- 设置符号的放置位置list-style-position:outside/inside
- 以上可简写list-style:none a.img inside; none去掉符号
图片属性
- 背景颜色 background-color: 可用rgba透明度
- 背景图片 background-image :url
- 背景图片的平铺 background-repeat :x/y no repeat
- 背景图片的定位 background-position:水平 垂直 负值
- 背景图片的固定 background-attachment
- 背景图片大小background-size : cover
- 背景的固定和滚动 scroll滚动 fixed固定
- 以上也可以简写background,顺序可换, 但size除外不可复合
.box1{
width: 200px;
height: 600px;
background-color: burlywood;
background-image: url(./a.png); /*默认平铺*/
background-repeat: no-repeat;
/*repeat-x/y 平铺满xy轴 no repeat 不平铺*/
/* background-position: left top; */
/*三种 px % center/left/top..*/
/* background-size:cover; */
/* px % cover将图片扩展足够大完全覆盖背景区域 部分会裁掉
contain将图片扩展至最大 以使其宽度和高度完全适应内容区 若铺不满 留白 */
background-attachment: fixed; /**相对跳出该块*/
}
.box{
width: 240px;
height: 500px;
background-color: lightcoral;
}