<style type="text/css">
#vent_img {
display: inline-block;
-webkit-animation: imageRotate 1s linear infinite;
-o-animation: imageRotate 1s linear infinite;
animation: imageRotate 1s linear infinite;
}
@-webkit-keyframes imageRotate {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}
@-o-keyframes imageRotate {
from {
-o-transform: rotate(0deg);
}
to {
-o-transform: rotate(360deg);
}
}
@keyframes imageRotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>
<ul class="ventilator">
<li class="start" onclick="startRound();">ПУСК</li>
<li class="stop" id="stop" onclick="stopRound()">СТОП</li>
<li class="vent"><img src="http://test.w-complex.ru/mac/control_panel/img/ventilater_small1.png" alt="" id="vent_img"></li>
</ul>
<script>
function startRound() {
document.getElementById('vent_img').style.cssText =
'-webkit-animation-play-state:running;-o-animation-play-state:running;animation-play-state:running;';
}
function stopRound() {
document.getElementById('vent_img').style.cssText =
'-webkit-animation-play-state:paused;-o-animation-play-state:paused;animation-play-state:paused;';
}
</script>