headers.vue 2.2 KB

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