Home > Article > Web Front-end > Animate the CSS padding-top property
To animate the padding-top property using CSS, you can try running the following code -
Live Demonstration
<!DOCTYPE html> <html> <head> <style> div { width: 350px; height: 150px; outline: 3px solid maroon; animation: myanim 3s infinite; } @keyframes myanim { 30% { padding-top: 60px; } } </style> </head> <body> <h1>CSS padding-top property</h1> <div> </div> </body> </html>
The above is the detailed content of Animate the CSS padding-top property. For more information, please follow other related articles on the PHP Chinese website!