0
我在嘗試&在Chrome中學習將對象從左到右移動並淡出它,但我無法弄清楚爲什麼在開始時跳轉到中心。css轉換跳轉到中心
https://jsfiddle.net/kissja74/3x8tgfut/
CSS:
#splash {
position: absolute;
animation-duration: 4s;
animation-name: fadeOut;
animation-fill-mode: forwards;
transition:4s;
right: 100%;
}
@keyframes fadeOut {
from {
left: 0;
opacity: 1;
}
to {
right: 0;
opacity: 0;
visibility: hidden;
}
}
HTML:
<div id="splash">A</div>
您不能動畫或轉換'visibility'。這可能是你正在尋找的:https://jsfiddle.net/3x8tgfut/1/ – connexo