如何使文字慢慢改变悬停的颜色
How to make text slowly change color on hover?
我想让我的文字慢慢改变颜色,像这样: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过渡。参见:Fiddle
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;
}
正如@ elclars所说,或者你也可以使用这个
$("selector").hover(function(){
// your code to fade in or fade out ....
});
Try
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;
}
相关文章:
- DT数据表背景颜色为黑色,但仍有悬停和选择颜色
- 在 ul 下更改内容的字体颜色,在悬停时
- 如何在悬停时更改SVG图像的颜色
- 悬停时颜色变为灰度在IE11中不起作用
- JQuery:悬停时文本颜色切换
- 更改鼠标悬停在选择菜单上的颜色
- 文本的实时预览使链接在悬停时不会更改背景颜色
- FullCalendar 2.3.0悬停时更改日期颜色
- 当鼠标悬停在不同颜色上时,传单突出显示标记
- 使用jquery更改颜色将删除悬停颜色
- 是否可以使用Javascript在页面刷新时随机生成预先确定的链接颜色和悬停颜色
- 如何将菜单上Cufon字体的悬停颜色更改为红色
- 如何更改表td的鼠标悬停颜色
- Jquery鼠标悬停颜色改变
- 是否可以为凸起按钮添加自定义悬停颜色?
- 文字的悬停颜色改变
- 使用javascript而不是css添加链接悬停颜色
- 带文本标签的按钮:即使在文本标签上,我如何保持悬停颜色
- 悬停颜色过渡幻灯片效果
- 如何在Ext Js 4.0中禁用默认的网格行悬停颜色变化