滑动以更改文本颜色动画 [英] Sliding in changing text color animation
本文介绍了滑动以更改文本颜色动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前正在网站上,并试图提出一个漂亮的菜单悬停动画.
I'm currently working on a website, and trying to come up with a nice menu hover animation.
从左向右滑动文本颜色.如果您明白我的意思?所以AE:
Sliding the text color from left to right.. If you get what I mean? So AE:
文字颜色:白色 新文字颜色:黑色 持续时间:0.5s
Text color: White New text color: Black Duration: 0.5s
但是让动画从左到右移动(只有文本颜色,而不是背景颜色).
But make the animation go from left to right (only the text color, not the background color).
这有可能吗,有人可能对此有解决方案吗?
Would this be possible, and does anyone maybe have a solution for this?
推荐答案
我只想出了这个主意.希望你能得到
I Only come up with this idea. Hope you get it
p:hover .red{
color: red;
transition: 1s;
}
p:hover .green{
color: red;
transition: 2s;
}
p:hover .blue{
color: red;
transition: 3s;
}
<p><span class="red">aa</span><span class="green">aa</span><span class="blue">aa</span></p>
这篇关于滑动以更改文本颜色动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文