效果图:
直接上demo
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title></title>
<style type="text/css">
header {
width: 100%;
overflow: hidden;
white-space: nowrap;
overflow-x: scroll;
position: fixed;
top: 0;
left: 0;
background-color: blue;
}
header::-webkit-scrollbar {
display: none;
}
.nav {
display: inline-block;
margin-left: 15px;
margin-right: 10px;
height: 50px;
line-height: 50px;
text-decoration: none;
color: #fff;
}
.con{
width: 100%;
height: 100px;
padding-top: 50px;
}
.active{
color: red;
}
</style>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
</head>
<body>
<header>
<a class="nav active" href="#con1">
基本信息
</a>
<a class="nav" href="#con2">
今借到
</a>
<a class="nav" href="#con3">
多头借贷
</a>
<a class="nav" href="#con4">
运营商
</a>
<a class="nav" href="#con5">
央行征信信息
</a>
<a class=&