Home > Web Front-end > CSS Tutorial > Animating CSS height properties

Animating CSS height properties

WBOY
Release: 2023-09-15 23:05:07
forward
1246 people have browsed it

动画 CSS 高度属性

To animate on the height property using CSS, you can try running the following code

Example

Live demonstration

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            border: 2px solid black;
            width: 300px;
            height: 100px;
            animation: myanim 5s infinite;
         }
         @keyframes myanim {
            30% {
               height: 400px;
            }
         }
      </style>
   </head>
   <body>
      <div>This is demo text</div>
   </body>
</html>
Copy after login

The above is the detailed content of Animating CSS height properties. 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