Clear CSS Transitions

廉价感情. 提交于 2019-12-06 18:07:40

问题


I use a CSS framework which applies transitions on moving the mouse over input elements. I have a class which I want to not have this transition. Is this possible?


回答1:


Just put transition:none; in the css and make its priority higher than the others.

Example:

html:

<div class="a"></div>
<div class="a b"></div>

​ css:

div.a {
    width: 200px;
    height: 100px;
    border: 1px solid black;
    background-color: #EEE;
    -webkit-transition: background-color 0.5s;
}
div.a:hover {
    background-color: #069;
}
div.a.b {
    -webkit-transition: none;
}​


来源:https://stackoverflow.com/questions/10630338/clear-css-transitions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!