当前位置:Gxlcms > html代码 > 对于CSS中background:transparentnonerepeatscroll0%0%;的理解_html/css_WEB-ITnose

对于CSS中background:transparentnonerepeatscroll0%0%;的理解_html/css_WEB-ITnose

时间:2021-07-01 10:21:17 帮助过:27人阅读

对于很多人对 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属性进行设置的时候 他就会使用这用设置。

人气教程排行