1. For Border-color style, document.getElementById (' demo '). style.bordercolor= ' red '; with a horizontal line to remove the horizontal line, start with the second letter to capitalize.
2. Change class operation, mainly for the overall style of the application, such as Web page skin-changing function.
<! DOCTYPE html>
<meta charset= "UTF-8" >
<title>Document</title>
<style>
#ddd img{
width:196px;
height:196px;
border:1px solid Transparent;
border-radius:50%;
}
@keyframes myfirst{
From{transform:rotate (0deg);}
To{transform:rotate (360deg);}
}
#ddd {
Animation:myfirst 3s linear infinite running;
width:200px;
height:200px;
margin:0 Auto;
border:1px solid red;
border-radius:50%;
}
. stop{
Animation:myfirst 3s linear infinite paused;
width:200px;
height:200px;
margin:0 Auto;
border:1px solid red;
border-radius:50%;
}
. running{
Animation:myfirst 3s linear infinite running;
width:200px;
height:200px;
margin:0 Auto;
border:1px solid red;
border-radius:50%;
}
</style>
<body>
<div id= "ddd" onmouseover= "document.getElementById (' ddd '). Style.animationplaystate= ' paused '";
onmouseout= "document.getElementById (' ddd '). Style.animationplaystate= ' Running '";>
</div>
<div id= "ddd" onmouseover= "this.classname= ' Stop '";
onmouseout= "This.classname= ' Running '" >
</div>
</body>
1.getelenmentbyid 2. Change class CSS3 Animation control