我想知道HTML块是否允许控件(或容器)开头的静态文本,那么当文本滑向左边时,它会滑动传递文本吗?
例如。
我看到的日期是静态的,与左对齐,数据库中的文本将滑动,传递,然后从右边重新出现。
HTML:
<marquee onmouseover="this.stop();" onmouseout="this.start();"
class="html-scroller" direction="left" behavior="scroll" scrollamount="12">
<p style="color:#626060; font-weight:bold">24/05/2015 - Some Infor here</p>
CSS:
.html-scroller
{
height:30px;
border:solid;
}
当然,上面的代码将使包括日期幻灯片在内的文本通过控制器上的边缘。
看看大屏幕的例子,没有什么,所以如果我必须改变它,会更容易创建我自己的?
发布于 2015-05-24 12:22:13
我不认为有一个部分静态文本解决方案的马奎斯。我会这么做:
<div class="container">
<div class="date">24/05/2015</div>
<div>
<marquee
onmouseover="this.stop();"
onmouseout="this.start();"
direction="left"
behavior="scroll"
scrollamount="12">
<p>
Some Infor here
</p>
</marquee>
</div>
</div>
CSS
.container
{
position: relative;
border: 2px solid #626060;
box-sizing: border-box;
}
.container,
.container .date {
padding: 10px;
background-color: #fff;
color: #626060;
font-weight: bold;
}
.container .date {
position: absolute;
top: 0;
left: 0;
z-index: 10;
}
.container marquee {
line-height: 0.8;
}
.container marquee p {
margin: 0;
}
https://stackoverflow.com/questions/30427656
复制相似问题