版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
移动端文字到达一定长度以后自动滑动效果:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>向左滑动显示剩余的隐藏文字</title>
<style type="text/css">
*{margin:0;padding:0;}
body{background: #EFEFF4;}
.m11{
height: 28px;
width: 400px;
overflow: hidden;
margin: 10px;
}
.m10 {
line-height: 28px;
height: 45px;
width: 420px;
overflow: auto;
background: #fff;
white-space: nowrap;
font-size: 14px;
}
</style>
</head>
<body>
<div class="m11"><div class="m10">新浪网新闻中心是新浪网最重要的频道之一,24小时滚动报道国内、国际及社会新闻。每日编发新闻数以万计。</div></div>
</body>
</html>