0
私が探しているのは、ループした要素の先頭からマーキーを開始することです。要素が画面からスクロールしてから要素の先頭に移動するまで移動します。アニメーションが正しく開始しない
今、要素は最後まで完全になります。要素が消えるとすぐに起動します。しかし、それが開始されると、要素の半分を開始するか、またはブラウザが小さな状態にある場合、開始するのに少し時間がかかります。
.marquee {
height: 60px;
width: 100%;
overflow: hidden;
/*position: relative;*/
}
.marquee div {
display: block;
width: fit-content;
height: 30px;
padding-bottom: 15px;
position: absolute;
overflow: hidden;
white-space: nowrap;
animation-name: marquee;
animation-duration: 15s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
.marquee div:hover {
animation-play-state: paused
}
@keyframes marquee {
0% {
transform: translateX(100%);
}
100% {
transform: translateX(-100%);
}
}
<html>
<body>
<div class="marquee">
<div>
<p>Some text. Some more text. It's times like these that try mens hearts. We strive to succeed. With hard work, we will. Here will be some various lines to stuff.</p>
</div>
</div>
</body>
</html>
5%のみ左側のオフを開始することのGaurav、。私はそれを右からスライドさせたい。 –