下列代码如何简写: background-image: url(tp.jpg); background-position:centertop; background-repeat:no-repeat;
A: ackground: url(tp.jpg) no-repeat centertop;
B: ackground: no-repeat centertop url(tp.jpg);
C: ackground: url(tp.jpg) centertopno-repeat;
A: ackground: url(tp.jpg) no-repeat centertop;
B: ackground: no-repeat centertop url(tp.jpg);
C: ackground: url(tp.jpg) centertopno-repeat;
举一反三
- 下列CSS代码进行缩写,符合缩写规范的是( )。 background-position : 0 0 ; background-repeat : no-repeat ;[br][/br]background-image : url( bg.gif ) ; A: ackground-image : "bg.gif" no-repeat 0 0 ; B: ackground : "bg.gif" no-repeat 0 0 ; C: ackground : url( "bg.gif" ) no-repeat 0 0 ; D: ackground-url : "bg.gif" no-repeat 0 0 ;
- (网站)background-color:#ccc;background-image:url(bg.png);background-repeat:no-repeat;background-position:-100pxcenter;以上样式的缩写正确的是?() A: background:#ccc,url(bg.png)no-repeat,-100pxcenter; B: background:#cccurl(bg.png)no-repeat-100pxcenter; C: background:#ccc;background-image:url(bg.png)no-repeat-100pxcenter; D: background-color:#ccc;background-image:url(bg.png)no-repeat-100pxcenter;
- 设置背景颜色为green,背景图片垂直居中显示,背景图片充满整个区域,但是背景图片不能变形,图片只出现一次,以下书写正确的是( ) A: ackground:url("../img/img1.jpg") no-repeat center/cover green; B: ackground:url("../img/img1.jpg") repeat center/cover green; C: url("../img/img1.jpg") no-repeat center/100% green; D: url("../img/img1.jpg") no-repeat center/100% 100% green;
- 设置背景颜色为 green, 背景图片垂直居中显示, 背景图片充 满整个区域,但是背景图片不能变形 , 图片只出现一次,以下书 写正确的是(): A: background:url("../img/img1.jpg") no-repeat center/cover green; B: background:url("../img/img1.jpg") repeat center/cover green; C: url("../img/img1.jpg") no-repeat center/100% green; D: url("../img/img1.jpg") no-repeat center/100% 100% green;
- 让一个盒子的背景图片只横向平铺() A: background:url(a1.jpg)repeat-x; B: background-color:repeat-x; C: background:url(a1.jpg)repeat-y; D: background:repeat;