我正在使用选取框标记使文本在我的网站上滚动。我目前正在使用占位符文本,但目的是使用无限动态饲料。

我目前已经设置好了,但是文本只跨一行。

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

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

09-25 20:48