固定导航栏在左边
.top{
height: 100%;
width: 50px;
background-color: blue;
position: fixed;
z-index: 1000;
}
<!-- 锁定导航栏 -->
<div class="top">
左
</div>
固定导航栏在头部
固定导航栏在底部
/* 固定导航栏 */
/* 固定顶部导航栏,在样式(css)中加入以下代码
position: fixed;
z-index: 1000;
right: 0;
bottom: 0;
left: 0px;
top: 0px;
width: 100%;
background: #eaeaea
固定底部导航栏,在样式(css)中加入以下代码
position:fixed;
left:0;
bottom:0;
width: 100%;
z-index: 1000;
background: #eaeaea