Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Animate vertical-align property with CSS Animation

I want to animate the vertical-align property in CSS. How can I achieve it?


1 Answer
Maheshwari Thakur

To implement animation on vertical-align property with CSS, you can try to run the following code

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         img {
            vertical-align: 80px;
            animation: myanim 3s;
         }
         @keyframes myanim {
            50% {
               vertical-align:120px;
            }
         }
      </style>
   </head>
   <body>
      <h1>CSS vertical-align property</h1>  
      <div></div>
      <p><img src="https://www.tutorialspoint.com/latest/microservice_architecture.png" width = "80" height = "80">
         This is demo text. This is demo text. This is demo text. This is demo text.
      </p>
   </body>
</html>
Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.