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

标签 html css 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;
}

最佳答案

我使用了标记:

<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/

相关文章:

php - 通过我的php代码以其他网站的形式填写数据

html - 从 HTML 输入触发 iOS 深色键盘

javascript - 这个函数的递归有什么问题? (setTimeout问题)

jquery - 我需要使用 jQuery 从 HTML 获取 id

javascript - 按下按钮时,将一个 div 推到当前 div 下面

html - 从无显示到显示 block 的 Css 转换,使用 subnav 导航

C# 引号中的引号(正则表达式匹配)

css - 如何创建类似于 allwomenstalk.com 的布局?

javascript - 设置选取框标签文本的初始位置

silverlight - 在 Silverlight 中计算选取框类型动画的速度