html - 从选取框移除白色间隙
问题描述
选框上有一个白色的间隙。
我放了一个很长的句子(突发新闻突发新闻突发新闻突发新闻突发新闻突发新闻突发新闻)但它一直在继续然后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>
解决方案
您可能不应该使用该<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>
推荐阅读
- css - 带有固定侧边栏的 CSS 网格
- r - R使用XML2将数据从XML提取到数据框
- javascript - 不同类型的对象数组
- vb.net - 根据不同的复选框组合显示消息
- ms-word - 将 VSTO 转换为 Web 插件
- cordova - 自定义离子清新剂和溢出效果
- javascript - Primefaces 按特定值/定义值过滤
- excel - 数据透视表中计算字段的小计
- javascript - 如何在 Jhipster Angular 生成的应用程序上使用电子?
- spring - GenericApplicationContext 与 XmlWebApplicationContext 和 AnnotationConfigWebApplicationContext 的区别