Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

การทำแอนิเมชันบนคุณสมบัติ CSS font-size


หากต้องการนำแอนิเมชันไปใช้กับคุณสมบัติ font-size ใน CSS สามารถลองรันโค้ดตัวอย่างด้านล่างได้

ตัวอย่าง

<!DOCTYPE html> <html>    <head>       <style>          p {             border: 2px solid black;             width: 400px;             height: 100px;             animation: myanim 5s infinite;          }          @keyframes myanim {             70% {                font-size: 30px;             }          }          </style>    </head>    <body>       <p>This is demo text</p>    </body> </html>