简体   繁体   English

CSS转换属性分别翻译

[英]css transform-property translate separately

What I'd like to do is use a transition on an objects transform, but have separate delays for translate() and scale() 我想做的是在对象变换上使用过渡,但是对translate()和scale()分别设置了延迟

Something to the effect of: 效果:

transition: transform:scale() 2s 0s ease, transform:translate() 2s 2s ease

This doesn't seem possible, but wanted to ask the masses. 这似乎不可能,但想问群众。

Alternatives could be using animation key-frames, or applying separate classes with two different transitions. 替代方案可以是使用动画关键帧,也可以应用具有两个不同过渡的单独类。

@-webkit-keyframes animIn
{
0%   {-webkit-transform:translateX(-1920px) scale(0.8);opacity:0;}
1%   {-webkit-transform:translateX(-1920px) scale(0.8);opacity:1;}
33%  {-webkit-transform:translateX(-1920px) scale(0.8);opacity:1;}
66%  {-webkit-transform:translateX(0px)     scale(0.8);opacity:1;}
100% {-webkit-transform:translateX(0px)     scale(1.0);opacity:1;}
}

The answer was to switch to an animation approach. 答案是切换到动画方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM