第五章单元测试
  1. 如果背景图像比容器小,默认情况下会发生什么?( )

  2. A:图像会按比例放大,撑满容器,多余的会被剪切
    B:图像只显示一张,其余地方留白
    C:图像被拉伸撑满整个容器
    D:图像会被平铺覆盖整个容器

    答案:图像会被平铺覆盖整个容器

  3. 当上下两个容器都设置了外边距为20px,那么这两个盒子的垂直外边距和是多少?( )

  4. A:20px
    B:80px
    C:40px
    D:10px
  5. CSS代码:.box{ width:100px; height:50px;},若想使盒子里的单行文本水平和垂直居中,该如何设置?( )

  6. A:margin:0 auto; line-height:50px;
    B:text-align:center; line-height:100px;
    C:margin:0 auto; text-align:center;
    D:text-align:center; line-height:50px;
  7. 下列哪项是设置了绝对定位?( )

  8. A:position:relative;
    B:position:inherit;
    C:position:absolute;
    D:position:fixed;
  9. 下列哪项是设置字体大小为20px,且字体加粗,并添加下划线?( )

  10. A:p{ font-size:20px; font-weight:normal; text-decoration:underline; }
    B:p{ font-size:20px; font-weight:bold; text-decoration:nonee; }
    C:p{ size:20px; font-weight:bold; text-decoration:underline; }
    D:p{ font-size:20px; font-weight:bold; text-decoration:underline; }
  11. 下列哪项是密码框的代码?( )

  12. A:<input type="text" />
    B:<input type="text"></input>
    C:<input type="password" />
    D:<input type="password" ></input>
  13. 关于float描述错误的是哪项?( )

  14. A:float:none;
    B:float:center;
    C:float:left;
    D:float:right;
  15. 以下哪个选项是对对象进行定位?( )

  16. A:padding
    B:display
    C:margin
    D:position
  17. 关于text-indent描述错误的是?( )

  18. A:text-indent:2em;
    B:text-indent:-2px;
    C:text-indent:none;
    D:text-indent:2px;
  19. CSS代码:.box{width:100px; height:100px; padding:10px; margin:20px;background-color:red;},这个盒子在页面中显示为红色区域的高和宽为多少?( )

  20. A:130*130
    B:160*160
    C:120*120
    D:100*100

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