css列表、边框、背景属性
属性:list-style-image:url() 添加列表图片,位置间距好多问题解决很麻烦
list-style-position:outside列表符号在内容区以外显示即在li外
inside列表符号在内容区以内显示即在li内和li是一个整体
list-style-type:circle列表符号圆点 square方块
none取消列表符号,常用通过插入背景图做
background:#0f0 url() no-repeat center center fixed;
属性 :1.background-color:#f00;背景色
background:url() no-repeat-xcenter center
2.url()引入背景图的路经
3.no-repeat背景图不平铺,repeat-x;沿着x轴(宽方向)平铺
repeat-y;沿着y轴(高方向)平铺
4.background-position背景图插入位置法定值left、center、rigth,或写
10px(距左边) 10px (距上边10px)
5.background-attachment:fixed背景图固定属性,不随滚动条拉动改变在 页面的位置,后期用定位
6.background-size:cover背景图等比放缩覆盖整个元素范围
注:1.背景图不占位置,img插入的图片占位置
2.padding对背景图的位置无影响,背景色会填充至padding区域
3.超出元素以外的背景图看不见
属性:border-width:10px 边框宽为10px
border-color:#f00 边框颜色
border-style:solid 边框线型为实线 dashed虚线 double双边线 dotted点
缩写:border:1px solid #f00
注:以上属性一个属性值代表上下左右的边框
两个值时第一个表示上下 第二个表示左右
三个值时分别是上 左右 下
四个值分别表示上 右 下 左