css module
作者:
踩坑怪At芬达 | 来源:发表于
2021-01-07 11:29 被阅读0次
css module内使用动画keyframes无效的解决方法
<div class="anmMoveIn"></div>
:global {
@keyframes framesMoveIn {
from {
transform: translate3d(0, 100%, 0);
}
to {
transform: translate3d(0, 0, 0);
}
}
- .anmMoveIn {
+ .anmMoveIn :local{ //在需要调用keyframe的元素后增加:local
animation-name: framesMoveIn;
animation-timing-function: linear;
animation-direction: normal;
animation-duration: .5s;
animation-fill-mode: both;
}
}
本文标题:css module
本文链接:https://www.haomeiwen.com/subject/ynfzoktx.html
网友评论