手揣网教程:绿色安全纯净官方版,体验当今速度最快的浏览器!

Background属性简介

时间:2024/12/15作者:未知来源:手揣网教程人气:

[摘要]属性 CSS版本 兼容性 继承性 描述background CSS1 IE4+ , NS4+ 无 复合属性。设置或检索对象的背景特性 background-attachment ...
属性 CSS版本 兼容性 继承性 描述
background CSS1 IE4+ , NS4+ 无 复合属性。设置或检索对象的背景特性
background-attachment CSS1 IE4+ , NS6+ 无 设置或检索背景图像是随对象内容滚动还是固定的
background-color CSS1 IE4+ , NS4+ 无 设置或检索对象的背景颜色
background-image CSS1 IE4+ , NS4+ 无 设置或检索对象的背景图像
background-position CSS1 IE4+ , NS6+ 无 设置或检索对象的背景图像位置
background-positionX IE专有属性 IE5.5+ 无 设置或检索对象的背景图像横坐标位置
background-positionY IE专有属性 IE5.5+ 无 设置或检索对象的背景图像纵坐标位置
background-repeat CSS1 IE4+ , NS4+ 无 设置或检索对象的背景图像是否及如何铺排
layer-background-color NS专有属性 NS4+ 无 设置或检索对象整个区域的背景颜色
layer-background-image NS专有属性 NS4+ 无 设置或检索对象整个区域的背景图像
------------------------
background可以定义的内容:
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。

关键词:Background属性简介




Copyright © 2012-2018 手揣网教程(http://www.shouchuai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版