background-repeat属性(可以设置哪些平铺方式)
background-repeat属性
界说和用法
background-repeat特点设置是否及如何重复布景图画。
默许地,布景图画在水平和笔直方向上重复。
具体阐明
background-repeat特点界说了图画的平铺形式。
从原图画开端重复,原图画由background-image界说,并依据background-position的值放置。
默许值:repeat
继承性:no
版本:CSS1
JavaScript语法:object.style.backgroundRepeat="repeat-y"
提示和注释
提示:布景图画的方位是依据background-position特点设置的。假如未规则background-position特点,图画会被放置在元素的左上角。
background-repeat属性可以设置哪些平铺方式
SetsorretrieveshowthebackgroundImagepropertyoftheobjectistiled.
Syntax
HTML{background-repeat:sRepeat}
Scriptingobject.style.backgroundRepeat[=sRepeat]
PossibleValues
sRepeatStringthatspecifiesorreceivesoneofthefollowingvalues.
repeatDefault.Imageisrepeatedhorizontallyandvertically.
no-repeatImageisnotrepeated.
repeat-xImageisrepeatedhorizontally.
repeat-yImageisrepeatedvertically.
Thepropertyisread/writeforallobjectsexceptthefollowing,forwhichitisread-only:currentStyle.Thepropertyhasadefaultvalueofrepeat.TheCascadingStyleSheets(CSS)attributeisnotinherited.
Expressionscanbeusedinplaceoftheprecedingvalue(s),asofMicrosoft?InternetExplorer5.Formoreinformation,seeAboutDynamicProperties.
例子:
.bg{
background-attachment:scroll;
background-image:url(../image/bg.png);
background-repeat:repeat-x;
background-position:centertop;
background-color:#cee6f3;
}
作品标签: background-r
优秀作品:
最新作品:
评论列表(共304人参与)参与讨论或分享设计作品获得视觉癖积分奖励
一、加载代注册会员
2020-12-19 1:31:44
ter;"> 都是围绕着明晰、精确、高效这三方面来编列的。 在学习CAD中的各项
回复用的照片注册会员
2020-12-19 11:58:37
导航窗口(N游客
2020-12-19 16:44:50
游客96509:background-repeign: center;"> iv> 愿无岁月可回首 且以深情共白头
回复49mm注册会员
2020-12-19 4:58:33
kground-image界说,并依据background-position的值放置。 摄这道门,你会看到另一个国际,一起也会带来更多的问题,很多类型的器件究竟什么才最适合你,要怎样学习把握用光,这样的照片要怎样样才干拍出来,究竟哪种风格才最适合你
回复