headers.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. }
  37. .header_left {
  38. width: 70%;
  39. float: left;
  40. height: 75px;
  41. }
  42. .header_right {
  43. width: 30%;
  44. float: left;
  45. height: 75px;
  46. }
  47. .logo_img {
  48. float: left;
  49. margin-left:5%;
  50. }
  51. .header_list {
  52. float: left;
  53. width:70%;
  54. padding-left:15%;
  55. }
  56. .nav_name {
  57. width: 15%;
  58. float: left;
  59. list-style: none;
  60. display: block;
  61. height: 38px;
  62. line-height: 85px;
  63. padding: 0 5px;
  64. margin: 0 11px;
  65. font-size: 18px;
  66. color: #555555;
  67. text-align:center;
  68. }
  69. .login_btn {
  70. width:30%;
  71. display:block;
  72. float:left;
  73. }
  74. .login_btn button {
  75. width: 85px;
  76. text-align: center;
  77. background: #26b5ff;
  78. color: #fff;
  79. height: 35px;
  80. line-height: 35px;
  81. margin: 22px 22px 0px 22px;
  82. border: 0;
  83. border-radius: 10px;
  84. font-size:18px;
  85. }
  86. .helper {
  87. width: 45%;
  88. display: block;
  89. float: left;
  90. padding-top:22px;
  91. }
  92. .helper button {
  93. padding: 0 17px;
  94. color: #288add;
  95. border: 1px solid #2196f3;
  96. height: 30px;
  97. line-height: 30px;
  98. background: #fff;
  99. font-size: 18px;
  100. }
  101. </style>