border-right-color - HTML CSS CSS Animatable Property

HTML CSS examples for CSS Animatable Property:border-right-color

Introduction

In the following code the color of the right border of the div element is animating from its initial value "red" to "indigo", and back to the initial value "red" again up to infinite times.

-webkit- prefix is for Chrome, Safari, Opera.

-moz- prefix is for Firefox.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html lang="en">
 <head>
  <title>Example of CSS border-right-color Property Animation</title>
  <style type="text/css">
.animated {<!--from   w ww . j  av  a2 s.c o m-->
  width: 300px;
  padding: 40px 0;
  font: bold 50px sans-serif;
  text-align: center;
    background: #EEEEEE;
    border: 20px solid red;
    -webkit-animation: test 4s infinite; 
    animation: test 4s infinite;
}

@-webkit-keyframes test {
    50% {border-right-color: indigo;}
}

@keyframes test {
    50% {border-right-color: indigo;}
}
</style>
 </head>
 <body>

  <p> </p>
  <div class="animated">
   Box
  </div>
 </body>
</html>

Related Tutorials