【问题标题】:background repeat not working with sass and foundation 5背景重复不使用 sass 和基础 5
【发布时间】:2015-03-25 13:20:31
【问题描述】:

我目前正在使用 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');
   }

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

有什么想法吗?

【问题讨论】:

    标签: sass mixins repeat zurb-foundation-5


    【解决方案1】:

    嗯,我知道发生了什么。

    我有

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

    覆盖了重复。对不起各位。

    【讨论】:

      猜你喜欢
      • 2013-07-25
      • 2014-12-21
      • 2017-04-16
      • 2014-11-16
      • 2016-02-23
      • 2014-12-09
      • 2014-05-04
      • 1970-01-01
      • 2013-04-12
      相关资源
      最近更新 更多