Search.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <div class="search">
  3. <form action="//search.bilibili.com/all" id="searchform">
  4. <input name="keyword" type="text" class="search-keyword" id="search-keyword" autocomplete="off" accesskey="s" x-webkit-speech="" x-webkit-grammar="builtin:translate" placeholder="这样的历史剧才靠谱!" data-recommend="av8509845">
  5. <button type="submit" class="search-submit"></button>
  6. </form>
  7. <a class="link-ranking" href="//www.bilibili.com/ranking" target="_blank">
  8. <span>排行榜</span>
  9. </a>
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. }
  15. </script>
  16. <style lang="stylus" scoped>
  17. .search
  18. z-index 100
  19. position absolute
  20. top calc(170px - (56px - 32px) - 32px)
  21. right 0
  22. width 268px
  23. height 32px
  24. padding 2px 2px 2px 72px
  25. background-color rgba(0, 0, 0, 0.12)
  26. border-radius 6px
  27. #searchform
  28. background-color rgba(255, 255, 255, 0.88)
  29. display block
  30. height 32px
  31. border-radius 4px
  32. transition .2s background-color
  33. margin-top 0em
  34. .search-keyword
  35. float left
  36. width 200px
  37. color #222
  38. font-size 12px
  39. overflow hidden
  40. height 32px
  41. line-height 32px
  42. padding 0 12px
  43. border 0
  44. box-shadow none
  45. background-color transparent
  46. outline 0
  47. .search-submit
  48. display block
  49. position absolute
  50. right 0
  51. width 48px
  52. cursor pointer
  53. height 32px
  54. background url(../../assets/images/icons.png) -653px -720px
  55. margin 0
  56. padding 0
  57. border 0
  58. .link-ranking
  59. position absolute
  60. left 2px
  61. top 2px
  62. height 32px
  63. line-height 32px
  64. background-color rgba(255, 255, 255, 0.8)
  65. border-radius 4px
  66. width 68px
  67. transition .2s background-color
  68. span
  69. padding-left 26px
  70. color #f25d8e
  71. display inline-block
  72. background url(../../assets/images/icons.png) -659px -655px no-repeat
  73. </style>