• 2022-07-02
    若背景图片比容器小,但只想要显示一张图片,且控制其位置在左侧居中显示,该如何设置代码?( )
    A: .box{ background-repeat:repeat; background-position:center left; }
    B: .box{ background-repeat:repeat; background-position:left center; }
    C: .box{ background-repeat:no-repeat; background-position:center left; }
    D: .box{ background-repeat:no-repeat; background-position:left center; }
  • D

    内容

    • 0

      背景图默认重复显示,即background-repeat:repeat; ( )

    • 1

      要实现背景图片在水平方向的平铺,应该设置为什么? A: background-repeat:repeat B: background-repeat:repeat-x C: background-repeat:repeat-y D: background-repeat:no-repeat

    • 2

      以下可以实现背景图片不重复的样式表是( )。 A: background-repeat:repeat-x; B: background-repeat:repeat-y; C: background-repeat:repeat; D: background-repeat:no-repeat;

    • 3

      (网站)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;

    • 4

      在css样式表中,下列设置页面背景图片的说法正确的是( A: background:src(images/news.jpg) bottom repeat-y; B: background:url(images/news.jpg)left bottom no-repeat C: 999999; D: background:url(images/news.jpg)left bottom repeat_y; E: background:link(images/news.jpg)left bottom no-repeat;