背景属性
background-color 设置元素的背景颜色
属性值为颜色值
background-image 设置背景图片
格式:background-image:url("图片的地址“);
background-repeat 背景图片的重复方式
repeat 所有方向重复 默认值
no-reapeat 不重复
repeat-x 横向重复
repeat-y 纵向重复
background-position 背景图片位置属性
格式:background-position: 横向坐标 纵向坐标
background-attachment 设置背景的滚动方式
fixed 背景图片绑定在页面中不滚动
scroll 背景图片跟随页面滚动
设置背景图像位置
background-position 背景位置
可用关键字:
水平:left center right
垂直:top center bottom
background-position:left;
background-position:right top;
background-position:right 100px;
可用数字:
background-position:水平 垂直;
background-position:200px 100px;
背景图像符合属性:background:pink url("img/1.jpg") no-repeat 200px;
background-attachment 背景位置固定
scroll 为背景图随页面一同滚动(默认)
fixed 为背景图位置固定不变。固定在屏幕上
background-size:100% 100% 背景图片大小
列表属性
list-style-type:定义列表样式
list-style-positon 列表项目标记的位置
list-style-position:
inside 列表项目标记放置在文本以内,且环绕文本根据标记对齐。
outside 默认值。保持标记位于文本的左侧。列表项目标记放置在文本以外,且环绕文本不跟据标记对齐。
list-style-image 列表内项目标记的图像
list-style-image:url() 图像的路经
none 默认,无图像被显示
border 边框属性
border-width: 设置四个边框的宽度 值为长度单位
border-style 设置四个边框的风格
值为以下:
double 双实线
dashed 虚线
solid 单实线
border-color 设置四个边框的颜色
值为颜色值
border 边框综合属性
所有属性值,可以用空格分隔,不能少属性
border-top 设置顶部边框
border-left 设置左侧边框
border-right设置右侧边框
border-bottom 设置底部边框
border-top:5px solid yellow;
边框的符合属性:border:1px solid red;