我將文本動畫顯示到屏幕的每個角落。在每個角落文字旋轉。這裏的問題在於,在右上角和左下角文本熄滅屏幕。我認爲這與輪換有關。CSS動畫/轉換屏幕
我的問題是我怎樣才能保持正確的位置在屏幕上的全文?
#lorem {
font-size: 50px;
color: red;
position: absolute;
top: 5%;
left: 5%;
animation: switch 10s linear infinite;
}
@keyframes switch {
0% {
bottom:auto;
top:3%;
left: 3%;
right: auto;
animation-timing-function: steps(1, end);
}
25% {
left:auto;
right:3%;
bottom: auto;
top: 3%;
animation-timing-function: steps(1, end);
transform: rotate(90deg);
}
50% {
top:auto;
bottom:3%;
right: 3%;
left: auto;
animation-timing-function: steps(1, end);
transform: rotate(180deg);
}
75% {
right:auto;
left:3%;
top: auto;
bottom: 3%;
animation-timing-function: steps(1, end);
transform: rotate(-90deg);
}
}
<span id="lorem">Lorem</span>
它在FF,並在不同的行爲章羅馬,很難理解你需要什麼 – areim
你必須改變我懷疑的'transform-origin'點。 –