div内容超出边界后怎样滑动,而且不显示滚动条?
未超出边界是这样的:
超出边界后:
请问怎样才能在超出边界后不换行,变成可以左右滑动,而且不显示滚动条?
网上查了一些办法, 说用一些第三方库,又没有简洁的实现方法?
代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fix</title>
<style>
.state {
margin: 15px 0 0 0;
padding: 5px 0 8px 15px;
background-color: rgb(84, 46, 69);
}
.state a {
font-size: 13px;
text-decoration: none;
color: #999;
padding: 1px 5px;
}
.state .active {
font-weight: bold;
color: #ddd;
padding-bottom: 2px;
border-bottom: 3px solid rgb(77, 111, 0);
}
</style>
</head>
<body>
<div class="state">
<a class="active">111</a>
<a>222</a>
<a>333</a>
<a>444</a>
<a>555</a>
<a>666</a>
<a>777</a>
<a>888</a>
<a>999</a>
<a>000</a>
<a>555</a>
<a>666</a>
<a>777</a>
<a>888</a>
<a>999</a>
<a>000</a>
</div>
</body>
</html>
html: