设置背景图像位置
1 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:url("img/1.jpg") no-repeat 200px 200px;
background-attachment 背景位置固定
background-attachment:scroll; //为背景图随页面一同滚动(默认)
background-attachment:fixed; //为背景图位置固定不变,固定在屏幕上
background-size:100% 100% 背景图片缩放
display的用法
display: none; //把原来文本显示的文字隐藏起来
display: block; //把原来文本隐藏的文字显示出来
列表属性:list-style
list-style-type: //定义列表样式
list-style-position //列表项目标记的位置
list-style-position:inside;//列表项目标记放置在文本以内,且环绕文本根据标记对齐。
list-style-position:outside; //默认值。保持标记位于文本的左侧。列表项目标记放置在文本以外,且环绕文本不根据标记对齐。
list-style-image 列表项目标记的图像
list-style-image: url() 图像的路径
none 默认,无图像被显示
border 边框属性
border-width: 设置四个边框的宽度 值为长度单位
border-style 设置四个边框的风格
值为以下:
border-style:double; 双实线
border-style:dashed 虚线
border-style:solid 单实线
border-color 设置四个边框的颜色
值为颜色值:
border边框综合属性
所有属性值,可以用空格分隔,不能少属性
border-top 设置顶部边框
border-left 设置左侧边框
border-right 设置右侧边框
border-bottom 设置底部边框
border-top:5px solid yellow;
边框的复合属性:border: 1px solid red;