Home > Web Front-end > CSS Tutorial > Animating CSS margin-bottom property

Animating CSS margin-bottom property

PHPz
Release: 2023-08-26 08:29:09
forward
1417 people have browsed it

动画 CSS margin-bottom 属性

To animate the margin-bottom property in CSS, you can try running the following code

Example

Online demonstration

<!DOCTYPE html>
<html>
   <head>
      <style>
         p {
            animation: mymove 3s infinite;
            margin-bottom: 20px;
         }
         @keyframes mymove {
            70% {
               margin-bottom: 60px;
            }
         }
      </style>
   </head>
   <body>
      <p>This is demo text! This is demo text! This is demo text!
         This is demo text! This is demo text! This is demo text!
         This is demo text! This is demo text! This is demo text!
         This is demo text! This is demo text! This is demo text!
      </p>
      <p>This is demo text 2!</p>
   </body>
</html>
Copy after login

The above is the detailed content of Animating CSS margin-bottom property. For more information, please follow other related articles on the PHP Chinese website!

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