清除CSS转换 [英] Clear CSS Transitions
本文介绍了清除CSS转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用一个CSS框架,在移动鼠标到输入元素时应用转换。
我有一个类,我想没有这个转换。这是可能吗?
解决方案
$ b
< 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;
}
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?
解决方案
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;
}
这篇关于清除CSS转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文