javascript - transform属性在这种情况下为什么不生效啊?
迷茫
迷茫 2017-04-11 13:14:34
0
3
1351

假设给一个p添加了一个@keyframes动画,这个动画控制p的transform属性,当hover这个p时停止这个动画,同时给p添加transform属性,此时transform属性不生效!!!甚至用JS给这个p绑定onmouseover事件改变transform都不生效,这是为什么???

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

répondre à tous(3)
刘奇

可将 animation-fill-mode 设置为 backwardnone 试试

Ty80

是不是设置animation的css选择器优先级比 hover连带的选择器优先级高? 比如animation设置的样式是用ID选择器,hover时候是用.class:hover

大家讲道理

把你代码贴上来看看

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!