我想到了开设一个如下课程的想法:

.animate,.animate>*,.animate>*>*,.animate>*>*>*,.animate>*>*>*>*,.animate>*>*>*>*>*,.animate>*>*>*>*>*>*,.animate*>*>*>*>*>*>*>, {
-webkit-transition: color .3s ease, opacity .3s ease, .3s ease;
-moz-transition: color .3s ease, opacity .3s ease, .3s ease;
-ms-transition: color .3s ease, opacity .3s ease, .3s ease;
transition: color .3s ease, opacity .3s ease, .3s ease;


}

这样我就可以在任何div上添加class =“ animate etc ..”,默认情况下,其中的任何内容都会获得这些动画。但是它只是不起作用,我记得我在某个阶段就起作用了,但是它整夜都停止了。理论上应该可以吗?

最佳答案

如果要在.animate类之后选择任何子元素,请使用:

.animate * {
    // Those rules apply to any child element of .animate
    -webkit-transition: color .3s ease, opacity .3s ease, .3s ease;
    -moz-transition: color .3s ease, opacity .3s ease, .3s ease;
    -ms-transition: color .3s ease, opacity .3s ease, .3s ease;
    transition: color .3s ease, opacity .3s ease, .3s ease;
}

关于jquery - 带有> *,> *> *等的全局动画类应如何为:change状态提供快速动画?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/37373982/

10-11 12:41