跟随内容定位的高亮悬浮导航显示(类似于锚点)
这是简略的样式
<style>
* {
margin: 0;
padding: 0;
}
.fixnav {
position: fixed;
left: 10px;
top: 100px;
display: none;
}
.fixnav li {
list-style: none;
width: 80px;
height: 45px;
line-height: 45px;
text-align: center;
color: #fff;
background: #ccc;
cursor: pointer;
}
.fixnav li.current {
background: #d36512;
}
.head {
width: 100%;
height: 200px;
background: seagreen;
margin-bottom: 20px;
text-align: center;
font-size: 50px;
line-height: 200px;
color: #fff;
}
.wrap .w {
width: 100%