首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >11 11摇摆不定的CSS3动画

11 11摇摆不定的CSS3动画
EN

Stack Overflow用户
提问于 2014-05-09 14:13:01
回答 1查看 3K关注 0票数 4

请参考这把小提琴:http://jsfiddle.net/eQegA/3/

代码语言:javascript
复制
<div class="spinner"></div>

.spinner {
    width: 100px;
    height: 100px;
    border: 50px solid blue;
    /*border-top-color: #fff;
    border-bottom-color: #fff;*/ /* commented out to see the wobble better */
    border-radius: 200px;    

    -webkit-animation: application-loading-rotate 1s;
    animation: application-loading-rotate 1s;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    -webkit-animation-timing-function: linear;
    animation-timing-function: linear;
}

@-webkit-keyframes application-loading-rotate {
  from {
    -webkit-transform: rotate(0deg);
  }
  to {
    -webkit-transform: rotate(360deg);
  }
}
@keyframes application-loading-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

在Google中,旋转是稳定的,但是由于某种原因,在IE11中,当它旋转时,会出现明显的“摆动”。

你知道它为什么会这样摇摆吗?有办法在IE11中修复它吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-05-12 09:31:24

不管它的价值如何,它也会出现在其他浏览器上。它必须做,如何划定边界,这不是一个完美的回合。据我所知,这个问题没有一个快速的解决办法。但是,您可以将边框绘制为背景图像。

代码语言:javascript
复制
.spinner {
display:block;
    width: 200px;
    height: 200px;
    border-radius: 100%;
    background-image:url(http://www.clipartbest.com/cliparts/9iR/RyK/9iRRyKLie.png);
    background-size:100%;

    -webkit-animation: application-loading-rotate 1s;
    animation: application-loading-rotate 1s;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    -webkit-animation-timing-function: linear;
    animation-timing-function: linear;
}

@-webkit-keyframes application-loading-rotate {
  from {
    -webkit-transform: rotate(0deg);
  }
  to {
    -webkit-transform: rotate(360deg);
  }
}
@keyframes application-loading-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

请参阅:http://jsfiddle.net/eQegA/26/

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23566831

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档