javascript , . "stopLight":
document.getElementById("stopLight").className = "blink-several-times";
CSS- CSS , :
.blink-several-times {
animation: myAnimation linear 4s;
animation-iteration-count: infinite;
transform-origin: 50% 50%;
-webkit-animation: myAnimation linear 4s;
-webkit-animation-iteration-count: infinite;
-webkit-transform-origin: 50% 50%;
-moz-animation: myAnimation linear 4s;
-moz-animation-iteration-count: infinite;
-moz-transform-origin: 50% 50%;
-o-animation: myAnimation linear 4s;
-o-animation-iteration-count: infinite;
-o-transform-origin: 50% 50%;
-ms-animation: myAnimation linear 4s;
-ms-animation-iteration-count: infinite;
-ms-transform-origin: 50% 50%;
}
@keyframes myAnimation{
0% {
background-color: rgba(0, 128, 0, 0);
}
100% {
background-color: rgba(0, 128, 0, 1);
}
}
@-moz-keyframes myAnimation{
0% {
-moz-transform: translate(0px,0px) rotate(0deg) ;
}
100% {
-moz-transform: translate(200px,0px) rotate(180deg) ;
}
}
@-webkit-keyframes myAnimation {
0% {
-webkit-transform: translate(0px,0px) rotate(0deg) ;
}
100% {
-webkit-transform: translate(200px,0px) rotate(180deg) ;
}
}
@-o-keyframes myAnimation {
0% {
-o-transform: translate(0px,0px) rotate(0deg) ;
}
100% {
-o-transform: translate(200px,0px) rotate(180deg) ;
}
}
@-ms-keyframes myAnimation {
0% {
-ms-transform: translate(0px,0px) rotate(0deg) ;
}
100% {
-ms-transform: translate(200px,0px) rotate(180deg) ;
}
}
"animation-iteration-count" . "", .
- -webkit, -o, -moz ..
css CSS, http://cssanimate.com/