gpt4 book ai didi

HTML Marquee - 将文本换行以填充浏览器窗口

转载 作者:行者123 更新时间:2023-11-28 15:24:45 27 4
gpt4 key购买 nike

我正在使用字幕标签在我的网站上滚动文本。我目前正在使用占位符文本,但目的是使用无限动态提要。

我目前已经设置好了,但文本只在一行中流动。

我希望能够将文本换行,以便用多行文本填充浏览器窗口

HTML:

<div id="scroll">
<marquee behavior="scroll" direction="left" scrollamount="50">Here is some scrolling text... right to left!Here is some scrolling text... right to left!Here is some scrolling text... right to left!Here is some scrolling text... right to left!Here is some scrolling text... right to left!Here is some scrolling text... right to left!Here is some scrolling text... right to left!Here is some scrolling text... right to left!</marquee>
</div>

CSS:

#scroll {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: black;
color: cyan;
font-size: 24px;
}

最佳答案

我使用了标记:

<div id="scroll">
<marquee behavior="scroll" direction="left" scrollamount="50">
<p>Here is some scrolling text... right to left!</p>
<p>Here is some scrolling text... right to left!</p>
<p>Here is some scrolling text... right to left!</p>
<p>Here is some scrolling text... right to left!</p>
<p>Here is some scrolling text... right to left!</p>
<p>Here is some scrolling text... right to left!</p>
<p>Here is some scrolling text... right to left!</p>
<p>Here is some scrolling text... right to left!</p>
<p>Here is some scrolling text... right to left!</p>
</marquee>
</div>

Example

关于HTML Marquee - 将文本换行以填充浏览器窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28371861/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com