为什么javascript引擎忙时div动画关键帧不工作?
我的页面结构如下:为什么javascript引擎忙时div动画关键帧不工作?,javascript,css,css-transitions,css-animations,loader,Javascript,Css,Css Transitions,Css Animations,Loader,我的页面结构如下: <head> <style> .windows8 { position: relative; width: 78px; height:78px; margin:auto; margin-top: 200px; } .windows8 .wBall { position: absolute; width: 74px; height
<head>
<style>
.windows8 {
position: relative;
width: 78px;
height:78px;
margin:auto;
margin-top: 200px;
}
.windows8 .wBall {
position: absolute;
width: 74px;
height: 74px;
opacity: 0;
transform: rotate(225deg);
-o-transform: rotate(225deg);
-ms-transform: rotate(225deg);
-webkit-transform: rotate(225deg);
-moz-transform: rotate(225deg);
animation: orbit 6.96s infinite;
-o-animation: orbit 6.96s infinite;
-ms-animation: orbit 6.96s infinite;
-webkit-animation: orbit 6.96s infinite;
-moz-animation: orbit 6.96s infinite;
}
.windows8 .wBall .wInnerBall{
position: absolute;
width: 10px;
height: 10px;
background: rgb(93, 147, 195);
left:0px;
top:0px;
border-radius: 10px;
}
.windows8 #1wBall_1,.windows8 #wBall_1 {
animation-delay: 1.52s;
-o-animation-delay: 1.52s;
-ms-animation-delay: 1.52s;
-webkit-animation-delay: 1.52s;
-moz-animation-delay: 1.52s;
}
.windows8 #1wBall_2,.windows8 #wBall_2 {
animation-delay: 0.3s;
-o-animation-delay: 0.3s;
-ms-animation-delay: 0.3s;
-webkit-animation-delay: 0.3s;
-moz-animation-delay: 0.3s;
}
.windows8 #1wBall_3,.windows8 #wBall_3 {
animation-delay: 0.61s;
-o-animation-delay: 0.61s;
-ms-animation-delay: 0.61s;
-webkit-animation-delay: 0.61s;
-moz-animation-delay: 0.61s;
}
.windows8 #1wBall_4,.windows8 #wBall_4 {
animation-delay: 0.91s;
-o-animation-delay: 0.91s;
-ms-animation-delay: 0.91s;
-webkit-animation-delay: 0.91s;
-moz-animation-delay: 0.91s;
}
.windows8 #1wBall_5,.windows8 #wBall_5 {
animation-delay: 1.22s;
-o-animation-delay: 1.22s;
-ms-animation-delay: 1.22s;
-webkit-animation-delay: 1.22s;
-moz-animation-delay: 1.22s;
}
@keyframes orbit {
0% {
opacity: 1;
z-index:99;
transform: rotate(180deg);
animation-timing-function: ease-out;
}
7% {
opacity: 1;
transform: rotate(300deg);
animation-timing-function: linear;
origin:0%;
}
30% {
opacity: 1;
transform:rotate(410deg);
animation-timing-function: ease-in-out;
origin:7%;
}
39% {
opacity: 1;
transform: rotate(645deg);
animation-timing-function: linear;
origin:30%;
}
70% {
opacity: 1;
transform: rotate(770deg);
animation-timing-function: ease-out;
origin:39%;
}
75% {
opacity: 1;
transform: rotate(900deg);
animation-timing-function: ease-out;
origin:70%;
}
76% {
opacity: 0;
transform:rotate(900deg);
}
100% {
opacity: 0;
transform: rotate(900deg);
}
}
@-o-keyframes orbit {
0% {
opacity: 1;
z-index:99;
-o-transform: rotate(180deg);
-o-animation-timing-function: ease-out;
}
7% {
opacity: 1;
-o-transform: rotate(300deg);
-o-animation-timing-function: linear;
-o-origin:0%;
}
30% {
opacity: 1;
-o-transform:rotate(410deg);
-o-animation-timing-function: ease-in-out;
-o-origin:7%;
}
39% {
opacity: 1;
-o-transform: rotate(645deg);
-o-animation-timing-function: linear;
-o-origin:30%;
}
70% {
opacity: 1;
-o-transform: rotate(770deg);
-o-animation-timing-function: ease-out;
-o-origin:39%;
}
75% {
opacity: 1;
-o-transform: rotate(900deg);
-o-animation-timing-function: ease-out;
-o-origin:70%;
}
76% {
opacity: 0;
-o-transform:rotate(900deg);
}
100% {
opacity: 0;
-o-transform: rotate(900deg);
}
}
@-ms-keyframes orbit {
0% {
opacity: 1;
z-index:99;
-ms-transform: rotate(180deg);
-ms-animation-timing-function: ease-out;
}
7% {
opacity: 1;
-ms-transform: rotate(300deg);
-ms-animation-timing-function: linear;
-ms-origin:0%;
}
30% {
opacity: 1;
-ms-transform:rotate(410deg);
-ms-animation-timing-function: ease-in-out;
-ms-origin:7%;
}
39% {
opacity: 1;
-ms-transform: rotate(645deg);
-ms-animation-timing-function: linear;
-ms-origin:30%;
}
70% {
opacity: 1;
-ms-transform: rotate(770deg);
-ms-animation-timing-function: ease-out;
-ms-origin:39%;
}
75% {
opacity: 1;
-ms-transform: rotate(900deg);
-ms-animation-timing-function: ease-out;
-ms-origin:70%;
}
76% {
opacity: 0;
-ms-transform:rotate(900deg);
}
100% {
opacity: 0;
-ms-transform: rotate(900deg);
}
}
@-webkit-keyframes orbit {
0% {
opacity: 1;
z-index:99;
-webkit-transform: rotate(180deg);
-webkit-animation-timing-function: ease-out;
}
7% {
opacity: 1;
-webkit-transform: rotate(300deg);
-webkit-animation-timing-function: linear;
-webkit-origin:0%;
}
30% {
opacity: 1;
-webkit-transform:rotate(410deg);
-webkit-animation-timing-function: ease-in-out;
-webkit-origin:7%;
}
39% {
opacity: 1;
-webkit-transform: rotate(645deg);
-webkit-animation-timing-function: linear;
-webkit-origin:30%;
}
70% {
opacity: 1;
-webkit-transform: rotate(770deg);
-webkit-animation-timing-function: ease-out;
-webkit-origin:39%;
}
75% {
opacity: 1;
-webkit-transform: rotate(900deg);
-webkit-animation-timing-function: ease-out;
-webkit-origin:70%;
}
76% {
opacity: 0;
-webkit-transform:rotate(900deg);
}
100% {
opacity: 0;
-webkit-transform: rotate(900deg);
}
}
@-moz-keyframes orbit {
0% {
opacity: 1;
z-index:99;
-moz-transform: rotate(180deg);
-moz-animation-timing-function: ease-out;
}
7% {
opacity: 1;
-moz-transform: rotate(300deg);
-moz-animation-timing-function: linear;
-moz-origin:0%;
}
30% {
opacity: 1;
-moz-transform:rotate(410deg);
-moz-animation-timing-function: ease-in-out;
-moz-origin:7%;
}
39% {
opacity: 1;
-moz-transform: rotate(645deg);
-moz-animation-timing-function: linear;
-moz-origin:30%;
}
70% {
opacity: 1;
-moz-transform: rotate(770deg);
-moz-animation-timing-function: ease-out;
-moz-origin:39%;
}
75% {
opacity: 1;
-moz-transform: rotate(900deg);
-moz-animation-timing-function: ease-out;
-moz-origin:70%;
}
76% {
opacity: 0;
-moz-transform:rotate(900deg);
}
100% {
opacity: 0;
-moz-transform: rotate(900deg);
}
}
</style>
<!-- 4-5 style links-->
<!-- 4-5 scripts -->
<!-- for testing you can put following code
for(var i=0;i<-1;i++){console.log(i)}
-->
</head>
<body>
<app>
<div class="windows8">
<div class="wBall" id="wBall_1">
<div class="wInnerBall"></div>
</div>
<div class="wBall" id="wBall_2">
<div class="wInnerBall"></div>
</div>
<div class="wBall" id="wBall_3">
<div class="wInnerBall"></div>
</div>
<div class="wBall" id="wBall_4">
<div class="wInnerBall"></div>
</div>
<div class="wBall" id="wBall_5">
<div class="wInnerBall"></div>
</div>
</div>
</app>
</body>
.windows8{
位置:相对位置;
宽度:78px;
高度:78px;
保证金:自动;
利润上限:200px;
}
.windows8.wBall{
位置:绝对位置;
宽度:74px;
高度:74px;
不透明度:0;
变换:旋转(225度);
-o变换:旋转(225度);
-ms变换:旋转(225度);
-webkit变换:旋转(225度);
-moz变换:旋转(225度);
动画:轨道6.96秒无限;
-o-动画:轨道6.96s无限;
-ms动画:轨道6.96s无限;
-webkit动画:轨道6.96s无限;
-moz动画:轨道6.96s无限;
}
.windows8.wBall.winneball{
位置:绝对位置;
宽度:10px;
高度:10px;
背景:rgb(93147195);
左:0px;
顶部:0px;
边界半径:10px;
}
.windows8#1wBall_1、.windows8#wBall_1{
动画延迟:1.52s;
-o-动画延迟:1.52s;
-ms动画延迟:1.52s;
-webkit动画延迟:1.52秒;
-moz动画延迟:1.52s;
}
.windows8#1wBall_2、.windows8#wBall_2{
动画延迟:0.3s;
-o-动画-延迟:0.3s;
-ms动画延迟:0.3s;
-webkit动画延迟:0.3s;
-moz动画延迟:0.3s;
}
.windows8#1wBall_3、.windows8#wBall_3{
动画延迟:0.61s;
-o-动画延迟:0.61s;
-ms动画延迟:0.61s;
-webkit动画延迟:0.61s;
-moz动画延迟:0.61s;
}
.windows8#1wBall_4、.windows8#wBall_4{
动画延迟:0.91s;
-o-动画延迟:0.91s;
-ms动画延迟:0.91s;
-webkit动画延迟:0.91s;
-moz动画延迟:0.91s;
}
.windows8#1wBall_5、.windows8#wBall_5{
动画延迟:1.22s;
-o-动画延迟:1.22s;
-ms动画延迟:1.22s;
-webkit动画延迟:1.22s;
-moz动画延迟:1.22s;
}
@关键帧轨道{
0% {
不透明度:1;
z指数:99;
变换:旋转(180度);
动画计时功能:放松;
}
7% {
不透明度:1;
变换:旋转(300度);
动画计时功能:线性;
来源:0%;
}
30% {
不透明度:1;
变换:旋转(410度);
动画计时功能:轻松进出;
来源:7%;
}
39% {
不透明度:1;
变换:旋转(645度);
动画计时功能:线性;
来源:30%;
}
70% {
不透明度:1;
变换:旋转(770度);
动画计时功能:放松;
来源:39%;
}
75% {
不透明度:1;
变换:旋转(900度);
动画计时功能:放松;
来源:70%;
}
76% {
不透明度:0;
变换:旋转(900度);
}
100% {
不透明度:0;
变换:旋转(900度);
}
}
@-o关键帧轨道{
0% {
不透明度:1;
z指数:99;
-o变换:旋转(180度);
-o-动画-计时-功能:缓解;
}
7% {
不透明度:1;
-o变换:旋转(300度);
-o-动画-计时-功能:线性;
-o源:0%;
}
30% {
不透明度:1;
-o变换:旋转(410度);
-o-动画-计时-功能:轻松输入输出;
-o源:7%;
}
39% {
不透明度:1;
-o变换:旋转(645度);
-o-动画-计时-功能:线性;
-o型起源:30%;
}
70% {
不透明度:1;
-o变换:旋转(770度);
-o-动画-计时-功能:缓解;
-o型起源:39%;
}
75% {
不透明度:1;
-o变换:旋转(900度);
-o-动画-计时-功能:缓解;
-o型起源:70%;
}
76% {
不透明度:0;
-o变换:旋转(900度);
}
100% {
不透明度:0;
-o变换:旋转(900度);
}
}
@-ms关键帧轨道{
0% {
不透明度:1;
z指数:99;
-ms变换:旋转(180度);
-ms动画计时功能:放松;
}
7% {
不透明度:1;
-ms变换:旋转(300度);
-ms动画计时功能:线性;
-ms起源:0%;
}
30% {
不透明度:1;
-ms变换:旋转(410度);
-ms动画计时功能:轻松输入输出;
-ms起源:7%;
}
39% {
不透明度:1;
-ms变换:旋转(645度);
-ms动画计时功能:线性;
-ms起源:30%;
}
70% {
不透明度:1;
-ms变换:旋转(770度);
-ms动画计时功能:放松;
-ms起源:39%;
}
75% {
不透明度:1;
-ms变换:旋转(900度);
-ms动画计时功能:放松;
-ms起源:70%;
}
76% {
不透明度:0;
-ms变换:旋转(900度);
}
100% {
不透明度:0;
-ms变换:旋转(900度);
}
}
@-webkit关键帧动态观察{
0% {
不透明度:1;
z指数:99;
-webkit变换:旋转(180度);
-webkit动画计时功能:轻松输出;
}
7% {
不透明度:1;
-webkit变换:旋转(300度);
-webkit动画计时功能:线性;
-网络工具包来源:0%;
}
30% {
不透明度:1;
-webkit变换:旋转(410度);
-webkit动画计时功能:轻松输入输出;
-网络工具包来源:7%;
}
39% {
不透明度:1;
-webkit变换:旋转(645度);
-webkit动画计时功能:线性;
-网络工具包来源:30%;
}
70% {
不透明度:1;
-webkit变换:旋转(770度);