header.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <style>
  2. .header {
  3. height: 80px;
  4. background-color: #20a0ff;
  5. color: #fff;
  6. position: fixed;
  7. top: 0;
  8. left: 0;
  9. width: 100%;
  10. z-index: 1000;
  11. line-height: @height;
  12. .container {
  13. height: 100%;
  14. }
  15. h1 {
  16. margin: 0;
  17. float: left;
  18. font-size: 32px;
  19. font-weight: normal;
  20. span {
  21. font-size: 12px;
  22. display: inline-block;
  23. width: 34px;
  24. height: 18px;
  25. border: 1px solid #fff;
  26. text-align: center;
  27. line-height: 18px;
  28. vertical-align: middle;
  29. margin-left: 10px;
  30. border-radius: 3px;
  31. }
  32. }
  33. .el-menu {
  34. float: right;
  35. height: 100%;
  36. line-height: 80px;
  37. background: transparent;
  38. }
  39. .el-menu-item {
  40. color: #fff;
  41. margin: 0;
  42. padding: 0 20px;
  43. }
  44. .el-menu-item__bar {
  45. background-color: #99d2fc;
  46. }
  47. }
  48. </style>
  49. <template>
  50. <header class="header">
  51. <div class="container">
  52. <h1>Element<span>Beta</span></h1>
  53. <el-menu default-active="1">
  54. <el-menu-item index="1">指南</el-menu-item>
  55. <el-menu-item index="2">组件</el-menu-item>
  56. <el-menu-item index="3">资源</el-menu-item>
  57. </el-menu>
  58. </div>
  59. </header>
  60. </template>
  61. <script>
  62. export default {
  63. };
  64. </script>