第五章测试
1.如果背景图像比容器小,默认情况下会发生什么?( )
A:图像被拉伸撑满整个容器
B:图像会按比例放大,撑满容器,多余的会被剪切
C:图像只显示一张,其余地方留白
D:图像会被平铺覆盖整个容器

答案:D
2.当上下两个容器都设置了外边距为20px,那么这两个盒子的垂直外边距和是多少?( )
A:80px
B:20px
C:10px
D:40px
3.CSS代码:.box{ width:100px; height:50px;},若想使盒子里的单行文本水平和垂直居中,该如何设置?( )
A:text-align:center; line-height:50px;
B:text-align:center; line-height:100px;
C:margin:0 auto; line-height:50px;
D:margin:0 auto; text-align:center;
4.下列哪项是设置了绝对定位?( )
A:position:absolute;
B:position:relative;
C:position:fixed;
D:position:inherit;
5.下列哪项是设置字体大小为20px,且字体加粗,并添加下划线?( )
A:p{ font-size:20px; font-weight:bold; text-decoration:nonee; }
B:p{ font-size:20px; font-weight:normal; text-decoration:underline; }
C:p{ font-size:20px; font-weight:bold; text-decoration:underline; }
D:p{ size:20px; font-weight:bold; text-decoration:underline; }
6.下列哪项是密码框的代码?( )
A:<input type="password" />
B:<input type="text"></input>
C:<input type="password" ></input>
D:<input type="text" />
7.关于float描述错误的是哪项?( )
A:float:right;
B:float:none;
C:float:left;
D:float:center;
8.以下哪个选项是对对象进行定位?( )
A:margin
B:padding
C:display
D:position
9.关于text-indent描述错误的是?( )
A:text-indent:none;
B:text-indent:-2px;
C:text-indent:2px;
D:text-indent:2em;
10.CSS代码:.box{width:100px; height:100px; padding:10px; margin:20px;background-color:red;},这个盒子在页面中显示为红色区域的高和宽为多少?( )
A:130*130
B:120*120
C:160*160
D:100*100

温馨提示支付 ¥3.00 元后可查看付费内容,请先翻页预览!
点赞(5) dxwkbang
返回
顶部