search.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. @import 'global.scss';
  2. .search-wrap {
  3. max-width: 800px;
  4. padding: 0 15px;
  5. margin: 0 auto;
  6. overflow: hidden;
  7. }
  8. .search-box {
  9. margin: 30px 0 20px;
  10. position: relative;
  11. height: 40px;
  12. line-height: 40px;
  13. border-radius: 6px;
  14. overflow: hidden;
  15. @media(min-width: 768px) {
  16. margin: 80px 0 30px;
  17. height: 48px;
  18. line-height: 48px;
  19. }
  20. .input {
  21. position: relative;
  22. display: block;
  23. margin-right: 80px;
  24. height: 100%;
  25. @media(min-width: 768px) {
  26. margin-right:120px;
  27. }
  28. input {
  29. display: block;
  30. width: 100%;
  31. height: 100%;
  32. line-height: 24px;
  33. padding: 12px;
  34. padding-right: 40px;
  35. border: 0;
  36. border-width: 1px 0 1px 1px;
  37. border-color: #dedede;
  38. border-style: solid;
  39. border-top-left-radius: 6px;
  40. border-bottom-left-radius: 6px;
  41. }
  42. i {
  43. cursor: pointer;
  44. position: absolute;
  45. right: 0;
  46. top: 0;
  47. width: 40px;
  48. height: 100%;
  49. background: url("/assets/image/search-x.png") no-repeat center;
  50. background-size: 15px;
  51. display: none;
  52. }
  53. }
  54. a {
  55. display: block;
  56. position: absolute;
  57. width: 80px;
  58. height: 100%;
  59. text-align: center;
  60. background: $color;
  61. right: 0;
  62. top: 0;
  63. color: #fff;
  64. font-size: 14px;
  65. @media(min-width:768px) {
  66. width: 120px;
  67. font-size: 16px;
  68. }
  69. }
  70. }
  71. .search-tab {
  72. border-bottom: 1px solid #dedede;
  73. a {
  74. display: inline-block;
  75. margin-right: 20px;
  76. height: 48px;
  77. line-height: 48px;
  78. border-bottom: 1px solid #fff;
  79. color: #666;
  80. font-size: 14px;
  81. padding: 0 5px;
  82. transition: all .5s ease;
  83. @media(min-width: 768px) {
  84. margin-right: 70px;
  85. height: 54px;
  86. line-height: 54px;
  87. font-size: 16px;
  88. }
  89. &.cur,
  90. &:hover {
  91. color: $color;
  92. border-color: $color;
  93. }
  94. }
  95. }
  96. .search-tab-con {
  97. li {
  98. border-bottom: 1px solid #dedede;
  99. padding: 15px 0;
  100. transition: all .5s ease;
  101. @media(min-width: 768px) {
  102. padding: 25px 0;
  103. }
  104. &:hover,
  105. &:active {
  106. padding-left: 5px;
  107. }
  108. a {
  109. display: block;
  110. &:hover,
  111. &:active {
  112. h2 {
  113. color: $color;
  114. }
  115. }
  116. }
  117. span {
  118. color: #999;
  119. font-size: 14px;
  120. }
  121. h2 {
  122. color: #111;
  123. line-height: 1.6;
  124. margin: 10px 0;
  125. font-size: 16px;
  126. transition: all .5s ease;
  127. @media(min-width: 768px) {
  128. font-size: 24px;
  129. }
  130. @media(min-width:1200px) {
  131. font-size: 28px;
  132. }
  133. }
  134. }
  135. }