【问题标题】:HTML Marquee - Wrap text to fill browser windowHTML Marquee - 换行以填充浏览器窗口
【发布时间】:2018-10-11 05:59:56
【问题描述】:

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

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

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

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;
}

【问题讨论】:

标签: html css marquee


【解决方案1】:

我使用了标记:

<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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-06-25
    • 2011-08-04
    • 1970-01-01
    • 2012-07-21
    • 2010-10-18
    • 1970-01-01
    • 2011-01-31
    • 1970-01-01
    相关资源
    最近更新 更多