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

ดำเนินการแอนิเมชั่นบนคุณสมบัติ CSS padding-top


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

ตัวอย่าง

<!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>