问题
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