すべてがFirefoxでうまくいきますが、クロムはアニメーションテキストがぼやけていることを示しています。私は前にここで言及-webkit-font-smoothing: subpixel-antialiased;
、-webkit-transform: translate3d(0,0,0);
、すべてのようにすべてをした:クロムアニメーションでテキストがぼやける
Webkit-based blurry/distorted text post-animation via translate3d
が、問題はまだ存在しています。
私は非常に簡単な例を示して、どのように見えるかを示します。この問題を解決するにはどうすればよいですか?
var text = 1;
function next() {
var next = (text == 2) ? 1 : 2;
document.getElementById('text' + text).className = 'out';
document.getElementById('text' + next).className = 'in';
text = next;
}
body {
padding: 0;
margin: 0;
font-family: tahoma;
font-size: 8pt;
color: black;
}
div {
height: 30px;
width: 100%;
position: relative;
overflow: hidden;
margin-bottom: 10px;
}
div div {
opacity: 0;
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
}
.in {
-webkit-animation: comein 1s 1;
-moz-animation: comein 1s 1;
animation: comein 1s 1;
animation-fill-mode: both;
}
@keyframes comein {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.out {
-webkit-animation: goout 1s 1;
-moz-animation: goout 1s 1;
animation: goout 1s 1;
animation-fill-mode: both;
}
@keyframes goout {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
<div>
<div class="in" id="text1">Hello! I'm Test Text. I'm Test Text jr Father!</div>
<div id="text2">Hi, I'm test text jr. I'm sharp and beautiful by nature but when I came in, Chrome made me blurry and I'm bad, I'm bad! ... Who's bad :)</div>
</div>
<button onclick="next();">Next</button>
また、このmisrenderingは、多くの場合、表示されCodePen
はクロムV53に再現することはできません。 net/1x8azozx/ – nkmol
@nkmolあなたはcodepenでそれを試すことができます:http://codepen.io/anon/pen/kkpJaL – ICE
私はクロームでOSXを使用していますここでぼやけていませんFYI –