0

このアニメーションを Chrome で実行すると、いくつかの問題が発生します。

.login-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -60px 0 0 -60px;
  background: #fff;
  width: 100px;
  height: 100px;
  border-radius: 100%;
  border: 10px solid #19bee1;
}
.login-loading:after {
  content: '';
  background: trasparent;
  width: 140%;
  height: 140%;
  position: absolute;
  border-radius: 100%;
  top: -20%;
  left: -20%;
  opacity: 0.7;
  box-shadow: rgba(255, 255, 255, 0.6) -4px -5px 3px -3px;
    -webkit-animation:rotates 2s infinite linear;
    -moz-animation:rotates 2s infinite linear;
    -o-animation:rotates 2s infinite linear;
  animation: rotates 2s infinite linear;
}

@keyframes rotates {
  0% {
    transform: rotateZ(0deg);
  }
  100% {
    transform: rotateZ(360deg);
  }
}
@-webkit-keyframes rotates {
  0% {
    transform: rotateZ(0deg);
  }
  100% {
    transform: rotateZ(360deg);
  }
}
@-moz-keyframes rotates {
  0% {
    transform: rotateZ(0deg);
  }
  100% {
    transform: rotateZ(360deg);
  }
}
@-o-keyframes rotates {
  0% {
    transform: rotateZ(0deg);
  }
  100% {
    transform: rotateZ(360deg);
  }
}

回転する「しっぽ」を持つローダーです。私の問題は、アニメーションが動いていない/実行されていないことです。Google Chrome を使用しています。

4

1 に答える 1

1

Safari と Chrome は属性を使用しています-webkit-transform

解決策は、すべてtransformの属性に属性を追加すること-webkit-transformです。

于 2013-08-31T22:54:26.813 に答える