navbar.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <!-- <ul class="home-nav-bar">
  3. <router-link class="nav-item" to="/home" tag="li">
  4. <span class="txt">首页</span>
  5. </router-link>
  6. <router-link class="nav-item" to="/position" tag="li">
  7. <span class="txt">职位</span>
  8. </router-link>
  9. <router-link class="nav-item" to="/notice/1" tag="li">
  10. <span class="txt">企业</span>
  11. </router-link>
  12. <li class="nav-item">
  13. <span class="txt">招聘会</span>
  14. </li>
  15. <router-link class="nav-item" to="/edu" tag="li">
  16. <span class="txt">资讯</span>
  17. </router-link>
  18. <li class="nav-item">
  19. <span class="txt">创业培训</span>
  20. </li>
  21. </ul> -->
  22. </template>
  23. <style lang="scss">
  24. .home-nav-bar {
  25. margin: 0;
  26. height: 60px;
  27. background: rgb(9,130,254);
  28. display: flex;
  29. flex-flow: row nowrap;
  30. align-items: center;
  31. justify-content: center;
  32. .nav-item {
  33. height: 100%;
  34. margin: 0 40px;
  35. display: flex;
  36. flex-flow: row nowrap;
  37. align-items: center;
  38. justify-content: center;
  39. cursor: pointer;
  40. .txt {
  41. font-size: 16px;
  42. color: #fff;
  43. }
  44. &.router-link-active {
  45. position: relative;
  46. &::after {
  47. position: absolute;
  48. left: 0;
  49. bottom: 0;
  50. content: '';
  51. width: 100%;
  52. height: 3px;
  53. background: #fff;
  54. }
  55. }
  56. &:hover {
  57. position: relative;
  58. &::after {
  59. position: absolute;
  60. left: 0;
  61. bottom: 0;
  62. content: '';
  63. width: 100%;
  64. height: 3px;
  65. background: #54cbc4;
  66. }
  67. }
  68. }
  69. }
  70. </style>