第7和第8单元测试
第8周 CSS布局与网页美化-2
- 在 CSS 语言中下列哪一项是设置"左边框"的语法?( )
A.border-left-width: <值>
B.border-top-width: <值>
C.border-left: <值>
D.border-top-width: <值>
正确答案: C - 下列( )是CSS 属性可以更改样式表的字体颜色。
A.text-color=
B.fgcolor:
C.text-color:
D.color:
正确答案: D - 以下( )是HTML常用的块状标签。
A.< span >
B.< a >
C.< br >
D.< h1 >
正确答案: D - 在HTML中,下列CSS属性中不属于盒子属性的是( )。
A.border
B.padding
C.float
D.margin
正确答案: C - 以下关于标准文档流的说法正确的是( )。
A.标题标签、段落标签、< span >标签都是块级元素
B.< div >… …< /div >标签是内联元素
C.< div >标签可以包含于< span >标签中
D.display属性可以控制块级元素和内联元素的显示方式
正确答案: D - 在CSS中,属性padding是指( )。
A.外边距
B.内边距
C.外边框
D.内边框
正确答案: B 你的答案: B - 阅读下面HTML代码,如果期望tabs位于box容器的右下角,则需要添加的CSS样式是( )。
< div id=“box” >< div id=“tabs” >< /div >< /div >
A.#tabs { position:absolute; right:0; bottom:0; }
B.#tabs { position:relative; right:0; bottom:0; }
C.#box { position:relative; } #tabs { position:absolute; right:0; bottom:0; }
D.#box { position:relative; } #tabs { position:right bottom; }
正确答案: C - 在HTML页面中,要通过无列表符号实现横向的导航菜单,不需要使用到的CSS属性是( )。
A.list-style
B.padding
C.z-index
D.float
正确答案: C - CSS盒子模型中表示内容与边框间的距离的属性为( ),表示盒子与其盒子之间的距离的属性为( )。
A.padding margin
B.padding border
C.margin padding
D.margin border
正确答案: A - 在网页中有一个id为content的div,下面( )正确设置它的宽度为200像素,高度为100像素,并且向左浮动。
A.#content{width:200px;height:100px;float:left;}
B.#content{width:100px;height:200px;clear:left;}
C.#content{width:200px;height:100px;clear:left;}
D.#content{width:100px;height:200px;float:left;}
正确答案: A - 下列CSS属性中,用于指定背景图片的是( )。
A.background-image
B.background-color
C.background-position
D.background-repeat
正确答案: A - 以下关于HTML代码说法正确的是( )。
img{ clear:both;}
A.将< img >标签左侧的浮动元素清除
B.将< img >标签右侧的浮动元素清除
C.将< img >标签两侧的浮动元素清除
D.设置< img >标签两侧允许浮动
正确答案: C - 在制作网页时,关于overflow属性说法错误的是( )。
A.overflow属性的常见值有visible、hidden、scroll、auto
B.当属性值为hidden时,如果内容被修剪,则浏览器会显示滚动条以便查看其余内容
C.可以使用overflow属性与合资宽度配合使用,清除浮动来扩展盒子的高度
D.如果页面中有绝对定位元素,并且绝对定位的元素超出了父级的范围,使用overflow属性则不合适
正确答案: B - 在HTML中,以下关于position属性的设定值描述错误的是( )。
A.static为默认值,没有定位,元素按照标准流进行布局
B.relative属性值设置元素的相对定位,垂直方向的偏移量使用up或down属性来指定
C.absolute表示绝对定位,需要配合top、right、bottom、left属性来实现元素的偏移量
D.用来实现偏移量的left和right等属性的值,可以为负数
正确答案: B