Vue实现顶部导航栏设计

效果图:
在这里插入图片描述
完整代码:

<template>
    <div class="title">
        <div class="title-left">
            <div class="title-left-image"></div>
            <router-link to="/unusedOrder">
               <span class="">导航一</span>
           </router-link>
           <router-link to="/usedOrder">
             <span class="">导航二</span>
           </router-link>
              <router-link to="/usedOrder">
             <span class="">导航三</span>
           </router-link>
           <router-link to="/advices">
             <span class="">导航四</span>
           </router-link>
           <router-link to="/evaluate">
             <span class="">导航五</span>
           </router-link>
        </div>
       <div>
       </div>
       <div class="serch">
         <div contenteditable class="inputType" placeholder='请输入文字'></div>
        <div class="button">搜索</div>
       </div>
       <div class="title-right">
           <div class="title-right-image"></div>
           <router-link to="/unusedOrder">
               <span class="">导航六</span>
           </router-link>
           <router-link to="/usedOrder">
             <span class="">导航七</span>
           </router-link>
           <router-link to="/advices">
             <span class="">导航八</span>
           </router-link>
       </div>
   </div>
</template>
<script>
export default {
    name:'Title',
}
</script>
<style>
.title{
    margin-left: 0px;
    height: 48px;
    width: 100%;
    background-color:#fff;
    border-bottom: 1px solid #DCDCDC;
    display: flex;
    justify-content:space-between;
}
.title-left{
    width: 580px;
    height: 48px;
    margin-left: 0;
    background:#fff;
    display: flex;

}
.title-left-image{
    height: 48px;
    width:120px
}
span{
    font-size: 16px
}
 a{
    width: 70px;
    height: 48px;
    color: black;
    margin: 0px 10px;
    text-decoration: none;
     line-height: 48px;
     text-align: center
}
 a:hover{
    background-color:	#BEBEBE;
}
.serch{
    height: 32px;
    width: 500px;
    background-color:#fff;
    margin: auto;
    display: flex;
}
.inputType{
  width:400px;
  height: 30px;
  text-indent: 1em;
   line-height: 34px;
  background-color: #fff;
  border: 1px solid black;
  border-top-left-radius: 17px;
  border-bottom-left-radius: 17px;
  font-size: 12px;
}
.inputType:focus{
  outline: none;   
  border: 1px solid rgb(230, 32, 213);
}
.button{
  color: #fff;
  text-align: center;
  background: rgba(204, 51, 0, 1);
  border-left:1px solid rgba(0, 0, 0, 0.45);
  width:100px;
  height: 32px;
  line-height: 34px;
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px
}
.title-right{
     width: 380px;
    height: 48px;
    display: flex;
}
.title-right-image{
    width: 40px;
    height: 40px;
    border: 1px solid black;
    border-radius: 20px;
    margin: auto ;
    margin-left: 40px;
}
</style>


  • 2
    点赞
  • 33
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值