CSS实现标签闪动效果

给标签元素的class 添加className即可

 1 <style>
 2             
 3             .className{
 4                 -webkit-animation: twinkling 1s infinite ease-in-out
 5             }
 6             .animated{
 7                 -webkit-animation-duration: 1s;
 8                 animation-duration: 1s;
 9                 -webkit-animation-fill-mode: both;
10                 animation-fill-mode: both
11             }
12             @-webkit-keyframes twinkling{
13                 0%{
14                     opacity: 0.5;
15                 }
16                 100%{
17                     opacity: 1;
18                 }
19             }
20             @keyframes twinkling{
21                 0%{
22                     opacity: 0.5;
23                 }
24                 100%{
25                     opacity: 1;
26                 }
27             }
28         </style>

 

 添加class为className的标签元素会一闪一闪的效果

posted @ 2022-05-13 16:32  勤快的懒羊羊  阅读(686)  评论(0编辑  收藏  举报