headers.vue 2.1 KB

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