.loading { opacity: 0; } .rotating { animation-name: rotateThis; animation-duration: 2s; animation-iteration-count: infinite; animation-timing-function: linear; -moz-animation-name: rotateThis; -moz-animation-duration: 2s; -moz-animation-iteration-count: infinite; -moz-animation-timing-function: linear; -ms-animation-name: rotateThis; -ms-animation-duration: 2s; -ms-animation-iteration-count: infinite; -ms-animation-timing-function: linear; /* Chrome, at least in Linux, renders a horrible shaky mess -- better not to bother. -webkit-animation-name: rotateThis; -webkit-animation-duration: 2s; -webkit-animation-iteration-count: infinite; -webkit-animation-timing-function: linear; */ } @keyframes rotateThis { from { transform: rotate( 0deg ); } to { transform: rotate( 360deg ); } } @-webkit-keyframes rotateThis { from { -webkit-transform: rotate( 0deg ); } to { -webkit-transform: rotate( 360deg ); } } @-moz-keyframes rotateThis { from { -moz-transform: rotate( 0deg ); } to { -moz-transform: rotate( 360deg ); } } @-ms-keyframes rotateThis { from { -ms-transform: rotate( 0deg ); } to { -ms-transform: rotate( 360deg ); } }