对于CSS中 background:transparent none repeat scroll 0% 0%;的理解

来源:互联网 发布:修改手机imei软件 编辑:程序博客网 时间:2024/04/28 20:11

对于很多人对    BACKGROUND: none transparent scroll repeat 0% 0%;这样的写法是错误的

但是系统会帮你解释成下面这样。
BACKGROUND:transparent none repeat scroll 0% 0%;

分别代表
背景属性:背景颜色 背景图片 背景是否重复 背景时候随浏览器滚动 背景平位置 背景垂直位置
background : background-color || background-image || background-repeat || background-attachment || background-position

transparent表示透明无颜色
none 表示没有设置背景图片
repeat 表示图片重复
scroll 表示背景图片随浏览器下拉而滚动
0%水平位置在x0
0%垂直位置在y0

这个设置是background 的默认设置 ,
也就是说 没有对background属性进行设置的时候 他就会使用这用设置。
1 0
原创粉丝点击