首页 > 解决方案 > 从选取框移除白色间隙

问题描述

选框上有一个白色的间隙。

我放了一个很长的句子(突发新闻突发新闻突发新闻突发新闻突发新闻突发新闻突发新闻)但它一直在继续然后B碰触到边缘

B突发新闻 突发新闻 突发新闻 突发新闻...

它不会从另一端出来,直到一切都通过

s

^上面是几乎要从另一端出来的句子^

我在谷歌上搜索过(我什至在谷歌上发现了一个黑客(搜索“marquee html”))

<marquee>here is the text I repeat it over and over again it keeps going and going but the beginning wouldn't come out until I touch it</marquee>

标签: htmltags

解决方案


您可能不应该使用该<marquee>标签,因为它已被弃用,或者已经过时,https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee

也许尝试一个 javascript/jquery 解决方案。有很多插件可以做到这一点

编辑

我找到了这个 jQuery Marquee 插件,它提供了一个没有你正在寻找的空白的选项。这是一个例子

$('.marquee').marquee({
  direction: 'left'
});
.marquee {
  width: 300px;
  overflow: hidden;
  border: 1px solid #ccc;
  background: #ccc;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type='text/javascript' src='//cdn.jsdelivr.net/jquery.marquee/1.4.0/jquery.marquee.min.js'></script>

<div class="marquee" data-duplicated='true' data-direction='left'>jQuery marquee is the best marquee plugin in the world</div>


推荐阅读