HTML Code:
<!DOCTYPE html><!-- Declaration of HTML5 document type -->
<html>
<head>
<title>How to set border-left-color is animatable</title><!-- Title of the HTML document -->
<style>
/* CSS styling */
#mydiv {
width: 300px; /* Sets the width of the div element to 300 pixels */
height: 200px; /* Sets the height of the div element to 200 pixels */
border: 15px solid #CC63FF; /* Sets the border properties of the div element */
-webkit-animation: mymove 5s infinite; /* Specifies the WebKit animation for the div element */
animation: mymove 5s infinite; /* Specifies the animation for the div element */
}
@keyframes mymove { /* Defines the keyframes for the animation named "mymove" */
50% {border-left-color: #FF63CC;} /* Specifies the border-left-color property for the animation */
}
</style>
</head>
<body>
<div id="mydiv">w3resource Tutorial</div><!-- The div element with the specified border properties -->
</body>
</html>
Explanation:
Live Demo:
See the Pen border-left-color-animatable-answer by w3resource (@w3resource) on CodePen.
See the solution in the browser
Supported browser
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4