【发布时间】:2015-12-22 10:27:24
【问题描述】:
我想在我的页面<div> 中包含一些垂直选取框文本,以便自动滚动内容。
我发现以下代码很有用;
<marquee behavior="scroll" direction="up" height="250" scrollamount="2" scrolldelay="10" onmouseover="this.stop()" onmouseout="this.start()">
content goes here<br>
content goes here<br>
content goes here<br>
content goes here
</marquee>
但它在内容之后添加了一个空格。只有在整个文本向上滚动(类似于重新启动)后才会出现内容。我怎样才能避免(或删除)这个空白?
我在 Stack Overflow 中找到了 here,并且注意到了 cloneNode()。我不知道如何实现。
*注意:高度属性不相关。它与父<div>具有相同的高度
【问题讨论】: