headers.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <div style="width:100%;border-bottom: #f1f1f1 solid 1px;">
  3. <div class="header_box">
  4. <div class="header_left">
  5. <img src="https://css.huijiaoyun.com/tianyu_edu/area/888888/images/logo/logo.png?v=0818" class="logo_img" />
  6. <div class="header_list">
  7. <ul>
  8. <li v-for="items in navlist" class="nav_name"><a :href="items.url" style="color:#555;">{{items.name}}</a></li>
  9. </ul>
  10. </div>
  11. </div>
  12. <div class="header_right">
  13. <div class="login_btn"><button>登录</button></div>
  14. <div class="helper"><button>教学助手</button></div>
  15. </div>
  16. </div>
  17. </div>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. navlist: [
  24. { "id": 1, "name": '首页', "url": '' },
  25. { "id": 2, "name": '资源', "url": '/resource' },
  26. { "id": 3, "name": '名师', "url": '' },
  27. { "id": 4, "name": '活动', "url": '/activity' },
  28. ],
  29. }
  30. }
  31. }
  32. </script>
  33. <style scoped>
  34. .header_box {
  35. width: 1200px;
  36. height: 85px;
  37. background-color: #fff;
  38. margin: 0 auto;
  39. }
  40. .header_left {
  41. width: 800px;
  42. float: left;
  43. height: 75px;
  44. }
  45. .header_right {
  46. width: 400px;;
  47. float: left;
  48. height: 75px;
  49. }
  50. .logo_img {
  51. float: left;
  52. margin-left:5%;
  53. }
  54. .header_list {
  55. float: left;
  56. width:70%;
  57. padding-left:15%;
  58. }
  59. .nav_name {
  60. width: 15%;
  61. float: left;
  62. list-style: none;
  63. display: block;
  64. height: 38px;
  65. line-height: 85px;
  66. padding: 0 5px;
  67. margin: 0 11px;
  68. font-size: 18px;
  69. color: #555555;
  70. text-align:center;
  71. }
  72. .login_btn {
  73. width:30%;
  74. display:block;
  75. float:left;
  76. margin-left:40%;
  77. }
  78. .login_btn button {
  79. width: 85px;
  80. text-align: center;
  81. background: #26b5ff;
  82. color: #fff;
  83. height: 35px;
  84. line-height: 35px;
  85. margin: 22px 22px 0px 22px;
  86. border: 0;
  87. border-radius: 10px;
  88. font-size:18px;
  89. }
  90. .helper {
  91. width: 30%;
  92. display: block;
  93. float: left;
  94. padding-top:22px;
  95. }
  96. .helper button {
  97. padding: 0 17px;
  98. color: #288add;
  99. border: 1px solid #2196f3;
  100. height: 30px;
  101. line-height: 30px;
  102. background: #fff;
  103. font-size: 18px;
  104. }
  105. </style>