background
作者:不详 来源: 【大 中 小】 浏览: 添加日期:2008-12-12 我要评论(0)
CSS background 属性
定义
background 是用于在一个声明中设置所有背景属性的一个简写属性。
通常建议使用这个属性,而不是分别使用单个属性,因为这个属性在较老的浏览器中能够得到更好的支持,而且需要键入的字母也更少。
继承性:NO
语法:background-color || background-image || background-repeat || background-attachment || background-position
JavaScript 语法
CSS 属性也可通过一段 JavaScript 被动态地改变。
脚本语法:
object.style.background = "#FF0000"
例子
body{
background:#FF0000;
}
body{
background:url(stars.gif) no-repeat top;
}
body{
background:#00FF00 url(stars.gif) no-repeat fixed top;
}
可能的值
| 值 | 描述 |
|---|---|
| background-color background-image background-repeat background-attachment background-position |
您可以在此声明中声明1到5个背景属性 默认值:未定义。 |
2008.10 made by colinivy && wondger
(如果您觉得本站不错,请告诉身边的朋友,或转载到论坛、百度知道、贴吧等,记得带网址哟,不胜感激!)
〖CSS手册〗Tags:
- 上一篇:CSS背景
- 下一篇:background-color
相关文章
更多评论(0)..会员评论
最新评论文章
推荐专题
在线交流QQ群
- 106310407(开)
- 55427134(开)
- 2993401(开)
- 33424604(开)
- 2993401(开)
- 161512108(开)
- 161510519(开)
- 158375021(开)
- 155858414(开)
- 143309878(开)
- 16373807(开)
- 129098721(开)
- 123473199(开)
- 146991009(开)
- 135792800(开)
- 78568516(开)
