Home > Article > Web Front-end > How to use color animation of hover animation in CSS3
We know that the effect of color animation in CSS is mainly achieved by using :before and :after. Let me introduce it to you today. How to use the color animation of hover animation in CSS3.
1. Color block change
html <span>fade</span> css /当前元素设置相对定位/.ech-fade, .ech-fade-t, .ech-fade-b, .ech-fade-l, .ech-fade-r, .ech-fade-c-in, .ech-fade-m-in, .ech-fade-m-out, .ech-fade-c-out, .ech-bounce-t, .ech-bounce-b, .ech-bounce-r, .ech-bounce-l { position: relative; transition: all .3s; z-index: 1;
2. Color upper and lower line change
html <span>overline-l</span> css /上划线和下划线变化 当前元素样式设置相对定位/.ech-overline-r, .ech-overline-l, .ech-underline-r, .ech-underline-l, .ech-underline-c, .ech-overline-c, .ech-underline-c-out, .ech-overline-c-out{ position: relative; transition: all .3s; z-index: 1;
3Arrow animation
html <span>arrow-l</span><span>arrow-r</span><span>arrow-t</span><span>arrow-b</span><span>arrow-l</span><span>arrow-r</span><span>arrow-t</span><span>arrow-b</span> css .ech-arrow-l, .ech-arrow-r, .ech-arrow-t, .ech-arrow-b, .ech-arrow-l-move, .ech-arrow-r-move, .ech-arrow-t-move, .ech-arrow-b-move{ position: relative; transition: all .3s; z-index: 1;
I believe you have mastered it after reading these cases Method, for more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
How to use the transform gradient attribute in Css3
Steps to implement the effect of creating a dynamic switch in Css3
The difference between the types of box models in CSS
The above is the detailed content of How to use color animation of hover animation in CSS3. For more information, please follow other related articles on the PHP Chinese website!