【问题标题】:Compass mixin transition指南针混合转换
【发布时间】:2015-02-23 16:18:56
【问题描述】:

我今天刚刚使用 Grunt 和 Compass 设置了一个项目。我刚刚尝试使用 mixin 转换,但出现错误:

错误:混合转换缺少参数 $time。

我的 SCSS 代码如下:

.five {
    .portfolio-tabs {
        list-style-type: none;
        padding: 0;
        margin: 0;
        li {
            padding: 10px;
            width: 25%;
            height: auto;
            display: block;
            float: left;
            a {
                border: 6px solid #f3f5f7;
                display: block;
                margin-bottom: 10px;
                min-height: 100px;
                @include transition(all 0.5s ease);
            } // a
            a.active, a:hover {
                border-color: #e1603a;
            } // a.active, a:hover
            img {
                margin: 0 auto;
            } // img
        } // li
    } // .portfolio-tabs
} // .five

我尝试了其他指南针 mixin,它们似乎工作正常。我的 SCSS 中是否存在我遗漏的错误?

【问题讨论】:

    标签: gruntjs transition mixins compass


    【解决方案1】:

    我找不到transition mixin 的任何文档。看来您正在寻找的是这样做

    @include transition-property(all);
    @include transition-duration(0.5s);
    @include transition-timing-function(ease);
    

    【讨论】:

      【解决方案2】:

      我遇到了同样的问题。问题是 mixin 缺少逗号来分隔每个参数。

      改变这个:

      @include transition(all 0.5s ease);
      

      到这里:

      @include transition(all, 0.5s, ease);
      

      【讨论】:

        猜你喜欢
        • 2014-01-05
        • 2013-07-29
        • 2011-07-05
        • 2012-12-27
        • 2011-10-06
        • 2011-01-05
        • 2016-05-05
        • 1970-01-01
        • 2013-01-30
        相关资源
        最近更新 更多