<!DOCTYPE html>
<html lang="en">
<head>
<title>工作</title>
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
<META HTTP-EQUIV="expires" CONTENT="0">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<link rel="stylesheet" href="static/css/swiper.min.css">
<script type="text/javascript" src="static/js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="setting.js"></script>
<script type="text/javascript" src="config.js"></script>
<script src="static/js/main.js?1012"></script>
<script src="static/js/swiper.min.js"></script>
<script src="static/js/vue-2.3.4.js"></script>
<script src="static/js/vconsole.min.js"></script>
<script type="text/javascript">
var vConsole = new VConsole();
</script>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
.wrap {
padding: 20px;
box-sizing: border-box;
}
.roofBox {
background-color: #eeeeee;
position: relative;
}
.navWrap {
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: #eeeeee;
}
.navTitle {
display: flex;
white-space: nowrap;
overflow-y: hidden;
}
.navTitle::-webkit-scrollbar {
display: none;
}
.navTitle li {
display: inline-block;
cursor: pointer;
text-align: center;
height: 46px;
width: 80px;
line-height: 52px;
margin: 0 20px;
}
a {
text-decoration: none;
color: #1c80f1;
}
.boxWrap {
position: fixed;
top: 68px;
width: 100%;
height: 90%;
overflow-y: auto;
scroll-behavior: smooth;
}
.contentBox {
margin-top: 20px;
}
.boxWrap::-webkit-scrollbar {
display: none;
}
.contentBox li {
list-style: none;
height: 200px;
}
.navTitle li.active {
border-bottom: 2px solid cornflowerblue;
}
</style>
</head>
<body class="p-application">
<div id="app">
<div class="wrap">
<div class="roofBox">
<div class="navWrap">
<ul class="navTitle">
<li :class="{'active':tabActive==0&&index==0}" v-for="(item,index) in navList"><a
:href="'#'+item.id">{{item.name}}</a></li>
</ul>
</div>
<div class="boxWrap">
<ul class="contentBox">
<li id="1">11111111111</li>
<li id="2">222222222222222</li>
<li id="3">3333333333333</li>
<li id="4">444444444444</li>
<li id="5">5555555555555</li>
<li id="6">6666666666666666</li>
<li id="7">77777777777777</li>
</ul>
</div>
</div>
</div>
</div>
<script>
new Vue({
el: "#app",
data: {
navList: [
{ name: "one", id: "1" },
{ name: "tow", id: "2" },
{ name: "three", id: "3" },
{ name: "four", id: "4" },
{ name: "five", id: "5" },
{ name: "six", id: "6" },
{ name: "seven", id: "7" },
],
tabActive: 0,
},
created() { },
mounted() {
$(".navTitle").on("click", "li", function () {
$(this).addClass("active").siblings().removeClass("active");
})
},
methods: {
}
});
</script>
</body>
</html>