0

我目前正在使用 SASS(SCSS) 和基础 5 框架工作。

我正在尝试通过正在工作的 mixin 来获取背景图像,但由于某种原因,我无法让“重复”CSS 功能正常工作。所有其他 CSS 函数都可以正常工作。

    @mixin cover-background($img-uri, $background-top:"center", $repeat:"repeat", $background-left:"center", $background-attachment:"fixed") {
    background: url($img-uri) unquote($repeat) unquote($background-top) unquote($background-left) unquote($background-attachment); 

   }

   body{
       @include cover-background('http://IMAGE.png');
   }

由于某种原因,图像拉得很好,它居中但不会重复。

有任何想法吗?

4

1 回答 1

0

好吧,我知道发生了什么。

我有

    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
     background-size: cover;  

这压倒了重复。对不起大家。

于 2015-03-25T05:20:31.747 回答