我正在使用 CSS3 为两个面部图像设置动画。它们水平对齐,并且应该相互靠近。我当前的 jsfiddle由于某种原因无法正常工作。
它出什么问题了?
<div id="screen">
<div id="animation-01">
<div class="face_turn_around">
<img id="imgR" src="http://www.centerwow.com/stackoverflow/face/face_right.png"
/>
<img id="imgL" src="http://www.centerwow.com/stackoverflow/face/face_left.png"
/>
</div> <!-- END face_turn_around -->
</div> <!-- END animation-01-->
</div> <!-- end TSCREEN -->
#screen {
background: blue;
border:1px solid #eee;
height:300px;
width:200px;
top:15px;
left:15px;
margin:0;
overflow:hidden;
padding:0;
position:relative;
}
#imgL {
position:absolute;
margin-left:25px;
margin-top:25px;
width:30px;
}
#imgR {
position:absolute;
margin-right:25px;
margin-top:25px;
width:30px;
}
@-webkit-keyframes face_turn_left {
from {
-webkit-transform: translate(0px, 0px);
}
to {
-webkit-transform: translate(50px, 0px);
}
}
@-webkit-keyframes face_turn_right {
from {
-webkit-transform: translate(0px, 0px);
}
to {
-webkit-transform: translate(50px, 100px);
}
}
#animation-01 {
position:relative;
-webkit-animation-name:face_turn_left;
-webkit-animation-name:face_turn_right;
-webkit-animation-duration:10s;
-webkit-animation-iteration-count:1;
-webkit-animation-timing-unction:function:linear;
-webkit-animation-delay:1s;
}