<!DOCTYPE html>
<html lang="en-US">
<head>
<style>
img{
width: 100px;
height: 100px;
margin-left: 100px;
-ms-transform: rotate(0deg); /* IE 9 */
-webkit-transform: rotate(0deg); /* Chrome, Safari, Opera */
transform: rotate(0deg);
animation: myAnimation 5s infinite;
-webkit-animation: myAnimation 5s infinite; /* Safari 4.0 - 8.0 */
}
@keyframes myAnimation {
50% {
transform-origin: 0% 100%;
-ms-transform: rotate(360deg); /* IE 9 */
-webkit-transform: rotate(360deg); /* Chrome, Safari, Opera */
transform: rotate(360deg);
}
}
/* Safari 4.0 - 8.0 */
@-webkit-keyframes myAnimation {
50% {
transform-origin: 0% 100%;
-ms-transform: rotate(360deg); /* IE 9 */
-webkit-transform: rotate(360deg); /* Chrome, Safari, Opera */
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<h1>CSS Animatable transform-origin</h1>
<img src="steering-wheel.png" alt="steering wheel"> </body>
</html>