【问题标题】:add transition ease to slider为滑块添加过渡缓动
【发布时间】:2014-06-03 22:39:26
【问题描述】:

我正在尝试为我的滑块添加缓动效果,以便图像在滑块中分别加载 1 秒和 2 秒。

这是我目前的代码

http://jsfiddle.net/kNZLx/

我希望 .figure 有 1s 的延迟,并且 .shadow 图形在此之后加载 1s 并从右向左滑入。

我的 sass 文件是这样的:

  .shadow {
    z-index:-1;
    position:absolute;
    @include single-transition($ease:2s) {
      transition: $ease;
    }
  }

但代码不起作用!

非常感谢任何建议。

【问题讨论】:

    标签: css sass css-transitions


    【解决方案1】:

    我以前用关键帧做过这个,看看http://www.w3schools.com/css/css3_animations.asp

    @-webkit-keyframes myfirst
    {
    0%   {background: red;}
    25%  {background: yellow;}
    50%  {background: blue;}
    100% {background: green;}
    }
    

    您可以在此处根据您希望它发生的整个动画设置持续时间的百分比。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-31
      • 2021-04-05
      • 2019-08-08
      • 1970-01-01
      相关资源
      最近更新 更多