CSS背景:background

翡翠西施美女

翡翠西施美女

2016-02-19 16:38

有一种朋友不在生活里,却在生命力;有一种陪伴不在身边,却在心间。图老师即在大家的生活中又在身边。这么贴心的服务你感受到了吗?话不多说下面就和大家分享CSS背景:background吧。

语法:

background : background-color || background-image || background-repeat || background-attachment || background-position

取值:

该属性是复合属性。请参阅各参数对应的属性。

默认值为:transparent none repeat scroll 0% 0%。

说明:

设置对象的背景样式。

如使用该复合属性定义其单个参数,则其他参数的默认值将无条件覆盖各自对应的单个属性设置。

例如:设置 background : white 等于设置 background : white none repeat scroll 0% 0% 。如果在此之前设置了 background-image 属性,则其设置将被 background-image 的默认值 none 覆盖。

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/webkaifa/)

背景样式属性的作用区域为对象的内容区域与内补丁( padding )区域。不包括边框( border )与外补丁( margin )区域。尽管该属性不可继承,但如果未指定,其父对象的背景颜色和背景图将在对象下面显示。

对应的脚本特性为 background 。

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/webkaifa/)

示例:

div { background: red no-repeat scroll 5% 60%; }
body { background: url("images/aardvark.gif") repeat-y; }
pre { background: url("images/aardvark.gif") top; }
caption { background: fuchsia; }

展开更多 50%)
分享

猜你喜欢

CSS背景:background

Web开发
CSS背景:background

CSS背景:background-color

Web开发
CSS背景:background-color

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

CSS背景:background-position-y

Web开发
CSS背景:background-position-y

CSS背景:background-position

Web开发
CSS背景:background-position

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

CSS背景:background-attachment

Web开发
CSS背景:background-attachment

CSS背景:background-repeat

Web开发
CSS背景:background-repeat

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

CSS文本:direction

CSS文本:direction

CSS-COLOR样式

CSS-COLOR样式
下拉加载更多内容 ↓