css - Webkit transform: rotate -
i've got code:
html:
<section class="progress"> <div class="spinner icon-spinner" aria-hidden="true"></div> <p class="label">loading</p> </section>
css:
@font-face { font-family: 'icomoon'; src:url('http://s3.amazonaws.com/icomoonfonts/4/6/f.eot'); src:url('http://s3.amazonaws.com/icomoonfonts/4/6/f.eot?#iefix') format('embedded-opentype'), url('http://s3.amazonaws.com/icomoonfonts/4/6/f.woff') format('woff'), url('http://s3.amazonaws.com/icomoonfonts/4/6/f.ttf') format('truetype'), url('http://s3.amazonaws.com/icomoonfonts/4/6/f.svg#icomoon') format('svg'); font-weight: normal; font-style: normal; } .icon-spinner:before { font-family: 'icomoon'; speak: none; font-style: normal; font-weight: normal; line-height: 1; -webkit-font-smoothing: antialiased; content: "\e002"; } @keyframes anim-rotate { 0% { transform: rotate(0); opacity: 1; } 50% { opacity: .7; } 100% { transform: rotate(359deg); opacity: 1; } } .spinner { display: inline-block; font-size:64px; height: 64px; line-height: 1; margin: .1em; animation: anim-rotate 3s infinite linear; color: rgba(223,78,107, 1); } body { text-align: center; line-height: 1.5; background: #fff; } .progress { margin:2em; } .progress .label { color:#777; margin:0; font-size:16px; font-family: tahoma,verdana,sans-serif; }
example: http://codepen.io/anon/pen/bfkaa/
why rotate(0deg); -> rotate(359deg);
shakes in chrome during rotation? example in ff working. can make code changes there obtain smooth rotation in chrome?
try ...
@keyframes anim-rotate { 0% { transform: rotate(0); opacity: 1; } 50% { opacity: 1; } 100% { transform: rotate(360deg); opacity: 1; }
Comments
Post a Comment