工具搜索引擎 加入收藏
意见反馈
帮助中心
繁體中文
首页 工具超市 产品信息 资讯中心 工具黄页 站长工具 实用工具 会员管理 联系我们  
广告投放
您当前的位置:工具网站长书库> CSS教程

CSS属性 - background 背景属性

说明

该CSS属性是一个复合属性,是5个背景属性 background-color, background-image, background-repeat, background-attachment 和 background-position 的综合快捷写法。背景所涉及的是 content 和 padding 区域,请参见 CSS 盒子模式 (Box Model)

值:[<'background-color'> || <'background-image'> || <'background-repeat'> || <'background-attachment'> || <'background-position'>] | inherit

可用值 值的说明
color background-color 的属性值
image background-image 的属性值
repeat background-repeat 的属性值
attachment background-attachment 的属性值
position background-position 的属性值

该CSS属性的缺省值为 transparent none repeat scroll 0% 0%。

示例代码

body {background:#99FF00 url(background.gif) no-repeat fixed 40px 100px}

继承

适用于

所有元素

返回上级目录
CSS
CSS教程
CSS简介
CSS语法
CSS字体属性(font)
CSS常用文本属性
CSS背景属性
CSS边框属性(border)
CSS边距属性(margin)
CSS间隙属性(padding)
CSS盒子模式(Box Model)
CSS列表属性(list-style)
CSS伪类(pseudo-class)
CSS代码示例
CSS参考(Reference)
CSS属性参考
CSS长度单位参考