指南针多个CSS过渡

css CSS

GilNear

2020-03-24

像这样的JsfiddleCompass如何进行多个CSS转换

我想做的是用Compass在下面基本编写此代码。

-webkit-transition: top 0.3s ease-out, background .9s .5s ease-out; 
   -moz-transition: top 0.3s ease-out, background .9s .5s ease-out; 
     -o-transition: top 0.3s ease-out, background .9s .5s ease-out; 
        transition: top 0.3s ease-out, background .9s .5s ease-out;

第3189篇《指南针多个CSS过渡》来自Winter(https://github.com/aiyld/aiyld.github.io)的站点

3个回答
番长 2020.03.24

这是你想要的?http://compass-style.org/reference/compass/css3/transition/#mixin-transition

@include transition( top 0.3s ease-out, background .9s .5s ease-out );

番长猴子 2020.03.24

如果您使用mixin定义转换,则会出现此错误:

错误:mixin转换仅需要1个参数;给定2

尝试将您的值放在括号之间,例如:

@include transition( (bottom .5s, background 2s) );
蛋蛋猿 2020.03.24

从文档中:http :
//compass-style.org/reference/compass/css3/transition/#mixin-transition

多年来,它可能已经发生了变化,但现在是这样的:

single-transition($property, $duration, $function, $delay)

请注意,$ delay是最后一个,而不是正确答案在最后一个之前的位置。

问题类别

JavaScript Ckeditor Python Webpack TypeScript Vue.js React.js ExpressJS KoaJS CSS Node.js HTML Django 单元测试 PHP Asp.net jQuery Bootstrap IOS Android