Loading image with css transform + PhoneGap problem
Hey guys!
I'm currently working on a android loading image, this one:
Well, i'm going to use this in my phonegap app and i ran into a problem.
In browser it works great! but when i load it in my phonegapp app it doesn't move.
Well i hope you guys have a solution for me!
Here is the code:
HTML:
- <div class="loadingDivHolder" id="eventPage" align="center">
- <div class="loading">
- <div class="outer"></div>
- <div class="inner"></div>
- </div>
- </div>
CSS:
- .loadingDivHolder {
- background: #F0F0F0;
- width: 100%;
- height: 100%;
- }
- .loading {
- position: relative;
- width: 96px;
- height: 96px;
- }
- .outer, .inner{
- position: absolute;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- animation-duration: 5s;
- -webkit-animation-duration: 5s;
- -moz-animation-duration: 5s;
- animation-iteration-count: infinite;
- -webkit-animation-iteration-count: infinite;
- -moz-animation-iteration-count: infinite;
- animation-timing-function: linear;
- -webkit-animation-timing-function: linear;
- -moz-animation-timing-function: linear;
- }
- .outer {
- background: url('../images/outerHolo.png');
- animation-name: rotate-outer;
- -webkit-animation-name: rotate-outer;
- -moz-animation-name: rotate-outer;
- }
- .inner {
- background: url('../images/innerHolo.png');
- animation-name: rotate-inner;
- -webkit-animation-name: rotate-inner;
- -moz-animation-name: rotate-inner;
- }
- @keyframes rotate-outer {
- from {
- transform: rotate(0deg);
- -moz-transform: rotate(0deg);
- -webkit-transform: rotate(0deg);
- }
- to {
- transform: rotate(1080deg);
- -moz-transform: rotate(1080deg);
- -webkit-transform: rotate(1080deg);
- }
- @keyframes rotate-inner {
- from {
- transform: rotate(720deg);
- -moz-transform: rotate(720deg);
- -webkit-transform: rotate(720deg);
- }
- to {
- transform: rotate(0deg);
- -moz-transform: rotate(0deg);
- -webkit-transform: rotate(0deg);
- }
- }