CSS 1.css介绍 css指的是层叠样式表(cascading style sheets) 官方文档:https://www.w3school.com.cn/css/index.asp为什么需要c
顺晟科技
2022-09-13 12:13:07
57
CSS之Background属性介绍2006-08-2300:35background可以定义的内容:
background:background-color||background-image||background-repeat||background-attachment||background-position
-------------------------
background-color:transparent|color
参数:
transparent:背景色透明
color:指定颜色。
----------------------------------
background-image:none|url(url)
参数:
none:无背景图
url:使用绝对或相对地址指定背景图像
-------------------------------
background-repeat:repeat|no-repeat|repeat-x|repeat-y
参数:
repeat:背景图像在纵向和横向上平铺
no-repeat:背景图像不平铺
repeat-x:背景图像在横向上平铺
repeat-y:背景图像在纵向平铺
说明:
设置或检索对象的背景图像是否及如何铺排。必须先指定对象的背景图像。
对应的脚本特性为backgroundRepeat。
----------------------------
background-attachment:scroll|fixed
参数:
scroll: 背景图像是随对象内容滚动
fixed: 背景图像固定
-------------------------------
background-position:length||length
background-position:position||position
参数:
length:百分数|由浮点数字和单位标识符组成的长度值。
position:top|center|bottom|left|center|right
说明:
设置或检索对象的背景图像位置。必须先指定background-image属性。默认值为:(0%0%)。
如果只指定了一个值,该值将用于横坐标。纵坐标将默认为50%。第二个值将用于纵坐标。
该属性定位不受对象的补丁属性(padding)设置影响。
对应的脚本特性为backgroundPosition。
09
2022-11
09
2022-11
09
2022-11
09
2022-11
09
2022-11
24
2022-10