Home > Web Front-end > CSS Tutorial > Animate the CSS padding-top property

Animate the CSS padding-top property

PHPz
Release: 2023-08-29 14:57:02
forward
806 people have browsed it

对 CSS padding-top 属性执行动画

To animate the padding-top property using CSS, you can try running the following code -

Example

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>
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template