【问题标题】:CSS3: transform flickers on FFCSS3:在 FF 上变换闪烁
【发布时间】:2016-01-05 18:44:48
【问题描述】:

我尝试为伪元素宽度 css3 设置动画。一切都好。但在动画结束时的 Firefox (43.0.3) 上,字体会闪烁:

div {
  width:500px;
  height:500px;
  color:red;
  font-size:100px;
  background:black;
  transform:matrix(1.0001,0.00,0.00,1.0001,0,0);
}
div:before {
  content:"test";
  font-size:100px;
  color:white;
  margin:0 0 0 200px;
  display:block;
  animation:test 2s ease-in-out 1s both;
  transform:matrix(1.0001,0.00,0.00,1.0001,0,0);
}
@keyframes test {
  0% {
    transform:matrix(1.0001,0.00,0.00,1.0001,0,0);
  }
  50% {
    transform:matrix(1.50,0.00,0.00,1.50,0,0);
  }
  100% {
    transform:matrix(1.0001,0.00,0.00,1.0001,0,0);
  }
}
<div></div>

[编辑] 我不明白如何链接到 jsfiddle。所以这是链接: jsfiddle.net SLASH focgzeye

有人可以帮忙吗?

【问题讨论】:

  • 在 OS X (Retina) 上的 Firefox 43 中似乎没问题。

标签: css firefox animation


【解决方案1】:

尝试添加与字体大小相同的行高:

line-height:100px;

在 Firefox 43.0.1 上测试,但同样存在闪烁问题。

Here the jsfiddle update.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-28
    • 1970-01-01
    相关资源
    最近更新 更多