vue项目简单写个底部导航定位

如图所示,我们在写移动端的时候需要给页面设定底部导航,那么就是我们的css样式了
在这里插入图片描述
我是把导航做成了组件样式,很简单的引入就行,下边看一下css样式吧
在这里插入图片描述
代码如下

.nav{
  width: 100%;
  height: 60px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0px -1px 1px #e6e6e6;
  background-color: #fff;
  margin: auto;
  // 或者 margin-bottom: 0px;
  border: 0 solid rgb(210, 210, 210);
  border-top-width: 1px;
  font-size: 20px;
}
好了搞定,一般没有要求不往导航上放图,现在放图的也少

猜你喜欢

转载自blog.csdn.net/lzfengquan/article/details/122960035