Der Versuch, eine CSS-Animation, die auf ein Bild aus dem Zentrum einblendet, indem Sie zwei zentrierte Divs mit dem gleichen Hintergrundbild [Svg], und animieren ihre Breite und Hintergrundposition. Das Problem ist, auf Chrom, gibt es ein schreckliches Jitter-Problem (vielleicht von Chrom Radfahren durch die Animationsschritte, anstatt sie gleichzeitig tun?)Jitter auf Chrom CSS-Animationen
Hier ist die JSFiddle: http://jsfiddle.net/evankford/s2uRV/4/, wo Sie das Jitter-Problem auf der linken Seite sehen können (die gleichzeitige Breitenanimation und Hintergrundpositionsanimation hat).
entsprechenden Code (sorry für einige übrig gebliebene Material von der Website in es ist)
HTML:
<div class="underheader-wrapper uhw-title">
<div class="underheader uhleft undertitle"> </div>
<div class="underheader uhright undertitle"> </div>
</div>
und CSS:
.undertitle {
-webkit-backface-visibility: hidden;
-webkit-transform: translateZ(0);
background-image:url(http://cereusbright.com/newsite/presskit/images/underheader.svg);
}
.underheader-wrapper {
position: relative;
margin: auto;
width:320px;
height:100px;
}
.underheader {
-webkit-backface-visibility: hidden;
position:absolute;
width: 0px;
height:100px;
opacity: 0;
background-size: 320px 60px;
background-repeat: no-repeat;
-moz-animation-delay: 3s; -webkit-animation-delay:3s;
-moz-animation-duration: 3s; -webkit-animation-duration: 3s;
-moz-animation-name: part1; -webkit-animation-name:part1;
-webkit-animation-fill-mode:forwards;
-moz-animation-fill-mode:forwards}
.uhleft {
background-position: -160px 40px;
right: 160px;
-webkit-backface-visibility: hidden;
-moz-animation-delay: 3s; -webkit-animation-delay:3s;
-moz-animation-duration: 3s; -webkit-animation-duration: 3s;
-moz-animation-name: part2; -webkit-animation-name:part2;
-webkit-animation-fill-mode:forwards;
-moz-animation-fill-mode:forwards}
.uhright {
background-position: -160px 40px;
left: 160px;}
@-webkit-keyframes part1 {
from {
width: 0px;
opacity: 0;
}
to {
width: 160px;
opacity: 1;
}}
@-webkit-keyframes part2 {
from {
background-position:-160px 40px;
width: 0px;
opacity: 0;
}
to {
width: 160px;
background-position: 0px 40px;
opacity: 1;
}}
@-moz-keyframes part1 {
from {
width: 0px;
opacity: 0;
}
to {
width: 160px;
opacity: 1;
}}
@-moz-keyframes part2 {
from {
background-position:-160px 40px;
width: 0px;
opacity: 0;
}
to {
background-position: 0px 40px;
width: 160px;
opacity: 1;
}}
Bin ich mit diesem Jitter stecken? Ich habe bereits eine JQuery-Version erstellt und festgestellt, dass CSS sauberer ist, aber der Jitter immer noch auftritt.
Ich sehe es immer noch, wenn in -webkit-animation-delay: 0s geändert; ' – AbdelElrafa