index.css 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. body {
  2. width: 100%;
  3. min-width: 320px;
  4. max-width: 640px;
  5. margin: 0 auto;
  6. font-family: -apple-system, Helvetica, sans-serif;
  7. font-size: 14px;
  8. color: #666;
  9. line-height: 1.5;
  10. }
  11. ul{
  12. list-style: none;
  13. margin: 0;
  14. padding: 0;
  15. }
  16. a {
  17. color: #666;
  18. text-decoration: none;
  19. }
  20. img {
  21. vertical-align: middle;
  22. }
  23. /*点击高亮我们需要清除清除 设置为transparent 完成透明*/
  24. * {
  25. -webkit-tap-highlight-color: transparent;
  26. }
  27. /*在移动端浏览器默认的外观在iOS上加上这个属性才能给按钮和输入框自定义样式*/
  28. input {
  29. -webkit-appearance: none;
  30. }
  31. /*禁用长按页面时的弹出菜单*/
  32. img,
  33. a {
  34. -webkit-touch-callout: none;
  35. }
  36. .app {
  37. height: 45px;
  38. }
  39. .app ul li {
  40. float: left;
  41. height: 45px;
  42. line-height: 45px;
  43. background-color: #333;
  44. text-align: center;
  45. color: white;
  46. }
  47. .app ul li:nth-child(1) {
  48. width: 8%;
  49. }
  50. .app ul li:nth-child(1) img {
  51. width: 10px;
  52. }
  53. .app ul li:nth-child(2) {
  54. width: 10%;
  55. }
  56. .app ul li:nth-child(2) img {
  57. width: 30px;
  58. vertical-align: middle;
  59. }
  60. .app ul li:nth-child(3) {
  61. width: 57%;
  62. }
  63. .app ul li:nth-child(4) {
  64. width: 25%;
  65. background-color: #f66515;
  66. }
  67. .search-wrap {
  68. position: fixed;
  69. height: 44px;
  70. min-width: 320px;
  71. max-width: 640px;
  72. width: 100%;
  73. overflow: hidden;
  74. }
  75. .search-btn {
  76. position: absolute;
  77. left: 0;
  78. top: 0;
  79. width: 40px;
  80. height: 44px;
  81. }
  82. .search-btn::before{
  83. content: "";
  84. display: block;
  85. width: 20px;
  86. height: 18px;
  87. background: url(../images/s-btn.png) no-repeat;
  88. background-size: 20px 18px;
  89. margin: 14px 0 0 15px;
  90. }
  91. .search-login {
  92. position: absolute;
  93. right: 0;
  94. top: 0;
  95. width: 40px;
  96. height: 44px;
  97. line-height: 44px;
  98. text-align: center;
  99. color: white;
  100. }
  101. .search {
  102. position: relative;
  103. height: 30px;
  104. margin: 0 50px;
  105. background-color: #fff;
  106. border-radius: 15px;
  107. margin-top: 7px;
  108. }
  109. .jd-icon {
  110. width: 20px;
  111. height: 15px;
  112. position: absolute;
  113. top: 8px;
  114. left: 13px;
  115. background: url(../images/jd.png) no-repeat;
  116. background-size: 20px 15px;
  117. }
  118. .jd-icon::after {
  119. content: '';
  120. display: block;
  121. width: 1px;
  122. height: 15px;
  123. position: absolute;
  124. background-color: #ccc;
  125. top: 0;
  126. right: -8px;
  127. }
  128. .sou {
  129. position: absolute;
  130. top: 8px;
  131. left: 50px;
  132. width: 18px;
  133. height: 15px;
  134. background: url(../images/jd-sprites.png) no-repeat -81px 0;
  135. background-size: 200px auto;
  136. }
  137. .slider img {
  138. width: 100%;
  139. }
  140. .swiper-container {
  141. width: 100%;
  142. height: 100%;
  143. }
  144. .swiper-slide {
  145. text-align: center;
  146. font-size: 18px;
  147. background: #fff;
  148. /* Center slide text vertically */
  149. display: -webkit-box;
  150. display: -ms-flexbox;
  151. display: -webkit-flex;
  152. display: flex;
  153. -webkit-box-pack: center;
  154. -ms-flex-pack: center;
  155. -webkit-justify-content: center;
  156. justify-content: center;
  157. -webkit-box-align: center;
  158. -ms-flex-align: center;
  159. -webkit-align-items: center;
  160. align-items: center;
  161. }
  162. .brand div{
  163. float: left;
  164. width: 33.33%;
  165. }
  166. .brand div img {
  167. width: 100%;
  168. }
  169. .barnd {
  170. border-radius: 2px 2px 0 0;
  171. }
  172. /* nav */
  173. nav {
  174. padding-top: 5px;
  175. }
  176. nav a {
  177. float: left;
  178. width: 20%;
  179. text-align: center;
  180. }
  181. nav a img {
  182. width: 40px;
  183. margin: 10px 0;
  184. }
  185. nav a span {
  186. display: block;
  187. }
  188. /* news */
  189. .news {
  190. margin-top: 20px;
  191. }
  192. .news a {
  193. float: left;
  194. /* CSS3 盒子模型,盒子的宽度包含border和padding */
  195. box-sizing: border-box;
  196. }
  197. .news a:nth-child(1) {
  198. width: 50%;
  199. }
  200. .news a:nth-child(n+2) {
  201. width: 25%;
  202. border-left: 1px solid #ccc;
  203. }
  204. .news img {
  205. width: 100%;
  206. }