我想让我的文字像这样慢慢改变颜色:http: //trentwalton.com/2011/05/10/fit-to-scale/
有任何想法吗?
我想让我的文字像这样慢慢改变颜色:http: //trentwalton.com/2011/05/10/fit-to-scale/
有任何想法吗?
您可以使用CSS 过渡:
a {
color: lime;
-webkit-transition: color 1s;
-moz-transition: color 1s;
-ms-transition: color 1s;
-o-transition: color 1s;
transition: color 1s;
}
a:hover {
color: red;
}
使用 CSS 过渡.. 看这个: 小提琴
a {
color: #000000;
}
a:hover {
color: #E24B3B;
}
ul a {
-webkit-transition: color 0.2s ease-out;
-moz-transition: color 0.2s ease-out;
-o-transition: color 0.2s ease-out;
-ms-transition: color 0.2s ease-out;
transition: color 0.2s ease-out;
}
正如@elclanrs 所说,或者您也可以使用它。
$("selector").hover(function(){
// your code to fade in or fade out ....
});
尝试
a {
color: red;
-webkit-transition: color 0.2s ease-out;
-moz-transition: color 0.2s ease-out;
-o-transition: color 0.2s ease-out;
-ms-transition: color 0.2s ease-out;
transition: color 0.2s ease-out;
}
a:hover {
color: blue;
}