Home >Web Front-end >CSS Tutorial >Steps to implement flame effect in CSS3 fonts
We know that CSS3 can create many cool animation effects, so today’s tutorial is how to use CSS3 font styles to create realistic flame special effects text. Let’s take a look.
html: <body> <p>火火火火</p> </body> css: <style> body{ font-size:120px; font-family:'微软雅黑'; background:#000; color:#fff;} @-webkit-keyframes test{ 0%{ text-shadow:0 0 20px #fefcc9,10px -10px 30px #feec85,20px -20px 40px #ffae34,20px -40px 50px #f3d131,0 -80px 70px #f38e1c; } 30%{ text-shadow:0 0 20px #fefcc9,10px -10px 30px #feec85,20px -20px 40px #ffae34,20px -40px 50px #f3d131,10px -90px 80px #f38e1c; } 60%{ text-shadow:0 0 20px #fefcc9,10px -10px 30px #feec85,20px -20px 40px #ffae34,20px -40px 50px #f3d131,0px -80px 100px #f38e1c; } 100%{ text-shadow:0 0 20px #fefcc9,10px -10px 30px #feec85,20px -20px 40px #ffae34,20px -40px 50px #f3d131,0 -80px 70px #f38e1c; } } p{font-weight:bold; color:#fff; text-shadow:0 0 20px #fefcc9,10px -10px 30px #feec85,20px -20px 40px #ffae34,20px -40px 50px #f3d131,0 -80px 70px #f38e1c; animation:1s test linear infinite; } </style>
I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
Tutorial on making div width adaptive
The relationship between web page renderings and DIV+CSS
Development experience using h tags in web pages
The above is the detailed content of Steps to implement flame effect in CSS3 fonts. For more information, please follow other related articles on the PHP Chinese website!