Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

第九章 盒模型

Total questions: 23

Worksheet time: 21mins

Name
Class
Date
1.
调整行距的属性为:
a)

height

b)
border-radius
c)

line-height

d)
leading
e)
padding
2.
盒模型由哪些部分组成?
a)

内容区,内边距,外边距

b)
空间
c)
透明元素
d)

内容区,内边距,外边距,边框

e)
内边距,外边距,边框
3.
哪个属性可以为段落左下角的边框设置圆角?
a)
border-bottom-left-radius: 10px
b)
border-top-left-radius: 10px
c)
border-top-right-radius: 10px
d)
border-bottom-right-radius: 10px
4.
使用盒模型时,元素的背景颜色会延申到 __________。
a)
内边距
b)
外边距
5.
如何正确为元素添加背景图像?
a)

background image: url (images/cat.svg);

b)

background-image: url (images/dog.png);

c)
background-image: url (cat and dog.jpeg);
d)
background-img: url (cat-and-dog.gif);
6.
如何让背景图像只在垂直方向上重复?
a)
background-repeat: repeat-y;
b)
background-repeat: repeat;
c)
background-repeat: no-repeat
d)
background-repeat: repeat-x;
e)
background-repeat: inherit;
7.
一个元素同时包含内边距(padding)和下内边距(padding-bottom)的属性,属性的顺序是否重要?
a)
重要
b)
不重要
8.
"@media"媒体查询中的哪个属性可以指定样式表的设备类型?
a)

max-width

b)
orientation
c)
min-device-width
d)

media

9.
HTML中包含多个外部样式表时,其顺序很重要。
a)
正确
b)
错误
10.
id可以包含空格。
a)

正确

b)

错误

11.
以下哪个选择器既包含父元素,又包含子孙元素?
a)
div h2
b)
h3
c)
q
12.
div {width:220px; padding:10px; border:5px solid green; margin:0px;} 的总宽度为:
a)

235px

b)
240px
c)

250px

d)

260px

13.
为某元素设置边框 {border-style: dotted outset solid double;},该元素的左边框为?
a)

实线边框

b)

双实线边框

c)
外凸边框
d)
点线边框
14.
为某元素设置边框 {border-style: dotted solid;},该元素的右边框为?
a)
实线边框
b)
双实线边框
c)
外凸边框
d)
点线边框
15.
可以用thick,medium和 thin作为值,为边框指定宽度。
a)
正确
b)
错误
16.
border-color属性如果单独使用不起作用,需先使用border-style属性来设置边框。
a)
正确
b)
错误
17.
为某元素设置边框{border-style:dotted solid double;},该元素的下边框为?
a)

实线边框

b)

双实线边框

c)
外凸边框
d)
没有边框
18.
可以仅用border属性设置边框,例如{border:5px solid green;}。
a)
正确
b)
错误
19.
{margin:25px 50px;}的_____外边距为50px。
a)
左右
b)
上下
20.
要为所有class="marked"的p元素指定一个样式,以下哪个选择器最合适?
a)

.marked{ }

b)
.marked p{ }
c)

p.marked{ }

d)
p{ }
21.
观察代码,哪个选项的说法是正确的:body {background-color: pink;} @media screen and (min-device-width: 992px) {body {background-color: lightgreen;}}
a)

如果设备宽度为992像素或更宽,则背景色为粉色

b)
如果设备宽度小于992像素,则背景色为浅绿色
c)

如果设备宽度为992像素或更宽,则背景色为浅绿色

d)
设备宽度和背景颜色没有关系
22.
观察代码@media screen and (max-width: 992px) {p {display: none; } },如果浏览器窗口的尺寸大于992px,则p的内容会_____?
a)
显示
b)
消失
23.
当页面的宽度大于高度时,背景色为“浅蓝色”,可以通过以下哪个选项实现?
a)
"@media only screen and (orientation: landscape) {body {background-color: lightblue;}}"
b)
"@media only screen and (orientation: portrait) {body {background-color: lightblue;}}"