css3 - Keyframe is not working with an AngularJS dynamically added class in Firefox or Safari -


i'm trying add class dynamically element in dom when model associated in angular true, in firefox , safari (works fine chrome), keyframe associated class (spinning) not showing up.

html:

<span class="{{loading ? 'loader' : ''}}"><i class="fa fa-github fa-4x"></i></span> 

css:

.loader {     text-align: center;     margin: 20px;     height: 40px;     -webkit-animation-name: spin;     -webkit-animation-duration: 1000ms;     -webkit-animation-iteration-count: infinite;     -webkit-animation-timing-function: linear;     -moz-animation-name: spin;     -moz-animation-duration: 1000ms;     -moz-animation-iteration-count: infinite;     -moz-animation-timing-function: linear;     -ms-animation-name: spin;     -ms-animation-duration: 1000ms;     -ms-animation-iteration-count: infinite;     -ms-animation-timing-function: linear;      animation-name: spin;     animation-duration: 1000ms;     animation-iteration-count: infinite;     animation-timing-function: linear; } @-ms-keyframes spin {     { -ms-transform: rotate(0deg); }     { -ms-transform: rotate(360deg); } } @-moz-keyframes spin {     { -moz-transform: rotate(0deg); }     { -moz-transform: rotate(360deg); } } @-webkit-keyframes spin {     { -webkit-transform: rotate(0deg); }     { -webkit-transform: rotate(360deg); } } @keyframes spin {     {         transform:rotate(0deg);     }     {         transform:rotate(360deg);     } } 

this not way add class depending of variable:

<span ng-class="{ 'loader' : loading }"><i class="fa fa-github fa-4x"></i></span> 

and problem styles, need use

display:block  

because safari expects block apply property.

you have example here: http://codepen.io/luarmr/pen/vlpbqj


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -