Animating a border color - HTML CSS CSS Animatable Property

HTML CSS examples for CSS Animatable Property:border-color

Description

Animating a border color

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
div {<!--   ww  w  .jav  a 2s  .co m-->
   background:linear-gradient(86deg, Chartreuse, yellow, blue);
   background-size:601% 601%;
   padding:21px;
   -webkit-animation:AnimationName 6s ease infinite;
   -moz-animation:AnimationName 6s ease infinite;
   animation:AnimationName 6s ease infinite;
}

div>div {
   height:401px;
   background:pink;
}

@-webkit-keyframes AnimationName  {
   0% {
      background-position:19% 0%
   }
   
   50% {
      background-position:84% 100%
   }
   
   100% {
      background-position:19% 0%
   }

}

@-moz-keyframes AnimationName  {
   0% {
      background-position:19% 0%
   }
   
   50% {
      background-position:84% 100%
   }
   
   100% {
      background-position:19% 0%
   }

}

@keyframes AnimationName  {
   0% {
      background-position:19% 0%
   }
   
   50% {
      background-position:84% 100%
   }
   
   100% {
      background-position:19% 0%
   }

}
</style> 
 </head> 
 <body> 
  <div> 
   <div>
     hello! 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials