index.css 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. body {
  2. overflow-x: hidden;
  3. -webkit-tap-highlight-color: transparent;
  4. -webkit-text-size-adjust: none;
  5. -moz-user-select: none;
  6. max-width: 540px;
  7. margin: 0 auto;
  8. background: #fafafc;
  9. height: 2000px;
  10. }
  11. ul {
  12. margin: 0;
  13. padding: 0;
  14. list-style: none;
  15. }
  16. a {
  17. text-decoration: none;
  18. color: #222;
  19. }
  20. /* 搜索模块 */
  21. .search-index {
  22. display: flex;
  23. /* 固定定位跟父级没有关系,以屏幕为准 */
  24. position: fixed;
  25. /* 固定的盒子要有宽度 */
  26. width: 100%;
  27. height: 44px;
  28. min-width: 320px;
  29. max-width: 540px;
  30. top: 0;
  31. left: 50%;
  32. z-index: 999;
  33. -webkit-transform: translate(-50%);
  34. transform: translateX(-50%);
  35. border-top: 1px solid #ccc;
  36. background-color: #f6f6f6;
  37. border-bottom: 1px solid #ccc;
  38. }
  39. .search {
  40. position: relative;
  41. flex: 1;
  42. box-sizing: border-box;
  43. height: 26px;
  44. line-height: 24px;
  45. border: 1px solid #ccc;
  46. border-radius: 5px;
  47. margin: 8px 10px;
  48. font-size: 12px;
  49. color: #666;
  50. padding-left: 25px;
  51. box-shadow: 0 2px 4px rgb(0,0,0,.2);
  52. }
  53. .search::before {
  54. content: "";
  55. position: absolute;
  56. top: 5px;
  57. left: 5px;
  58. width: 15px;
  59. height: 15px;
  60. background: url(../images/sprite.png) no-repeat -59px -279px;
  61. background-size: 104px auto;
  62. }
  63. .user {
  64. width: 44px;
  65. height: 44px;
  66. font-size: 12px;
  67. text-align: center;
  68. color: #2eaae0;
  69. }
  70. .user::before {
  71. content:"";
  72. display: block;
  73. width: 23px;
  74. height: 23px;
  75. background: url(../images/sprite.png) no-repeat -59px -194px;
  76. background-size: 104px auto;
  77. margin: 5px auto 0;
  78. }
  79. /* 焦点图 */
  80. .focus {
  81. position: relative;
  82. padding-top: 44px;
  83. overflow: hidden;
  84. }
  85. .focus ul {
  86. width: 500%;
  87. overflow: hidden;
  88. margin-left: -100%;
  89. }
  90. .focus ul li {
  91. float: left;
  92. width: 20%;
  93. }
  94. .focus ol {
  95. position: absolute;
  96. bottom: 5px;
  97. right: 5px;
  98. margin: 0;
  99. }
  100. .focus ol li {
  101. display: inline-block;
  102. width: 5px;
  103. height: 5px;
  104. background-color: white;
  105. list-style: none;
  106. border-radius: 5px;
  107. transition: all .3s;
  108. }
  109. .focus ol li.current {
  110. width: 15px;
  111. }
  112. .focus img {
  113. width: 100%;
  114. }
  115. /* 局部导航栏 */
  116. .local-nav {
  117. display: flex;
  118. height: 64px;
  119. margin: 2px 4px;
  120. border-radius: 8px;
  121. }
  122. .local-nav li{
  123. flex: 1;
  124. }
  125. .local-nav a{
  126. display: flex;
  127. flex-direction: column;
  128. /* 侧轴居中对齐 */
  129. font-size: 12px;
  130. align-items: center;
  131. }
  132. .local-nav li [class^='local-nav-icon'] {
  133. width: 32px;
  134. height: 32px;
  135. margin-top: 8px;
  136. background: url(../images/localnav_bg.png) no-repeat 0 0;
  137. background-size: 32px auto;
  138. }
  139. .local-nav li .local-nav-icon-icon2 {
  140. background-position: 0 -32px;
  141. }
  142. .local-nav li .local-nav-icon-icon3 {
  143. background-position: 0 -64px;
  144. }
  145. .local-nav li .local-nav-icon-icon4 {
  146. background-position: 0 -96px;
  147. }
  148. .local-nav li .local-nav-icon-icon5 {
  149. background-position: 0 -128px;
  150. }
  151. /* 主导航栏 */
  152. nav {
  153. border-radius: 8px;
  154. margin: 3px 4px 0;
  155. }
  156. .nav-common {
  157. display: flex;
  158. height: 88px;
  159. border-radius: 8px;
  160. background-color:rgb(155, 48, 66);
  161. }
  162. .nav-common:nth-child(1) {
  163. background: -webkit-linear-gradient(left, #ef5a55, #fa994d);
  164. }
  165. .nav-common:nth-child(2) {
  166. background: -webkit-linear-gradient(left, #4b90ed, #53bced);
  167. }
  168. .nav-common:nth-child(3) {
  169. background: -webkit-linear-gradient(left, #34c2a9, #6cd559);
  170. }
  171. .nav-common:nth-child(2) {
  172. margin: 4px 0;
  173. }
  174. .nav-items {
  175. flex: 1;
  176. display: flex;
  177. flex-direction: column;
  178. }
  179. .nav-items a {
  180. line-height: 44px;
  181. align-items: center;
  182. text-align: center;
  183. flex: 1;
  184. color: #fff;
  185. font-size: 14px;
  186. /* 文字阴影 */
  187. text-shadow: 1px 1px rgb(0,0,0,.2);
  188. }
  189. .nav-items a:first-child {
  190. border-bottom: 1px solid #fff;
  191. }
  192. .nav-items:first-child a {
  193. border-bottom: none;
  194. background: url(../images/hotel.png) no-repeat bottom center;
  195. background-size: 121px auto;
  196. }
  197. .nav-items:nth-child(-n+2){
  198. border-right: 1px solid #fff;
  199. }
  200. /* 侧导航栏 */
  201. .subnav-entry {
  202. display: flex;
  203. flex-wrap: wrap;
  204. border-radius: 8px;
  205. background-color: #fff;
  206. margin: 0 4px;
  207. padding: 5px 0;
  208. }
  209. .subnav-entry li {
  210. /* 相对于父亲来说的 */
  211. flex: 20%;
  212. }
  213. .subnav-entry a {
  214. display: flex;
  215. flex-direction: column;
  216. align-items: center;
  217. }
  218. .subnav-entry a [class^=subnav-entry-icon] {
  219. width: 28px;
  220. height: 28px;
  221. background-color: pink;
  222. margin-top: 4px;
  223. background: url(../images/subnav-bg.png) no-repeat;
  224. background-size: 28px auto;
  225. }
  226. .subnav-entry a .subnav-entry-icon2 {
  227. background-position: 0 -64px;
  228. }
  229. .subnav-entry a .subnav-entry-icon3 {
  230. background-position: 0 -100px;
  231. }
  232. /* 销售模块 */
  233. .sales-box {
  234. border-top: 1px solid #ccc;
  235. margin-top: 4px;
  236. background-color:#fff;
  237. }
  238. .sales-hd {
  239. position: relative;
  240. height: 44px;
  241. border-bottom: 1px solid #ccc;
  242. }
  243. .sales-hd h2 {
  244. position: relative;
  245. text-indent: -999px;
  246. overflow: hidden;;
  247. }
  248. .sales-hd h2::after {
  249. position: absolute;
  250. content: "";
  251. width: 79px;
  252. height: 15px;
  253. background: url(../images/hot.png) no-repeat 0 -20px;
  254. background-size: 79px auto;
  255. top: 10px;
  256. left: 20px;
  257. }
  258. .more {
  259. position: absolute;
  260. right: 5px;
  261. top: 8px;
  262. background: -webkit-linear-gradient(left, #ff505c, #ff6bc6);
  263. border-radius: 15px;
  264. padding: 3px 20px 3px 10px;
  265. color: #fff;
  266. }
  267. .more::after {
  268. content:"";
  269. position: absolute;
  270. top: 7px;
  271. right: 7px;
  272. width: 7px;
  273. height: 7px;
  274. border-top: 2px solid #fff;
  275. border-right: 2px solid #fff;
  276. transform: rotate(45deg)
  277. }
  278. .row {
  279. display: flex;
  280. }
  281. .row a {
  282. flex: 1;
  283. border-bottom: 1px solid #ccc;
  284. }
  285. .row a:nth-child(1){
  286. border-right: 1px solid #ccc;
  287. }
  288. .row a img {
  289. width: 100%;
  290. }
  291. /* 返回顶部 */
  292. .goBack {
  293. display: none;
  294. position: fixed;
  295. bottom: 20px;
  296. right: 20px;
  297. width: 38px;
  298. height: 38px;
  299. background: url(../images/back.png) no-repeat;
  300. background-size: 38px 38px;
  301. }