flex.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. /**/
  2. :root {
  3. position: relative;
  4. font-size: 1px;
  5. }
  6. header,
  7. footer,
  8. div,
  9. p,
  10. ul,
  11. li,
  12. h1,
  13. h2,
  14. h3,
  15. h4,
  16. h5,
  17. h6 {
  18. display: block;
  19. }
  20. div,
  21. p,
  22. ul,
  23. li,
  24. h1,
  25. h2,
  26. h3,
  27. h4,
  28. h5,
  29. h6,
  30. label {
  31. padding: 0;
  32. margin: 0;
  33. }
  34. .scrollbar-hidden ::-webkit-scrollbar {
  35. display: none;
  36. }
  37. .scrollbar-hidden ::-moz-scrollbar {
  38. display: none;
  39. }
  40. .scrollbar-hidden ::-ms-scrollbar {
  41. display: none;
  42. }
  43. .scrollbar-hidden ::-o-scrollbar {
  44. display: none;
  45. }
  46. /* #ifndef MP-WEIXIN */
  47. * {
  48. padding: 0;
  49. margin: 0;
  50. -webkit-box-sizing: border-box;
  51. -moz-box-sizing: border-box;
  52. -ms-box-sizing: border-box;
  53. -o-box-sizing: border-box;
  54. box-sizing: border-box;
  55. border: 0;
  56. outline: 0;
  57. font-size: 100%;
  58. vertical-align: baseline;
  59. background: transparent;
  60. outline-style: none;
  61. }
  62. *::before {
  63. box-sizing: border-box;
  64. }
  65. /* #endif */
  66. html {
  67. width: 100%;
  68. }
  69. body {
  70. font-size: 14px;
  71. color: #333;
  72. position: relative;
  73. line-height: 1;
  74. font-family: Verdana, Arial, Helvetica, sans-serif;
  75. }
  76. ol,
  77. ul,
  78. li {
  79. list-style: none;
  80. }
  81. a,
  82. a:hover,
  83. a:focus {
  84. color: inherit;
  85. text-decoration: none;
  86. outline-style: none;
  87. /*FF*/
  88. }
  89. /*css为clearfix,清除浮动*/
  90. .clearfix {
  91. /* zoom: 1; */
  92. /*IE/7/6*/
  93. zoom: 1;
  94. /*IE/7/6*/
  95. }
  96. .clearfix::before,
  97. .clearfix::after {
  98. content: "";
  99. height: 0;
  100. line-height: 0;
  101. display: block;
  102. visibility: hidden;
  103. clear: both;
  104. }
  105. .clearfix:after {
  106. content: "";
  107. height: 0;
  108. line-height: 0;
  109. display: block;
  110. visibility: hidden;
  111. clear: both;
  112. }
  113. .clearfix:after {
  114. clear: both;
  115. }
  116. img {
  117. z-index: 0;
  118. }
  119. /*文本对齐*/
  120. .ta_right {
  121. text-align: right;
  122. }
  123. .ta_center {
  124. text-align: center;
  125. }
  126. .ta_justify {
  127. text-align: justify;
  128. }
  129. /*隐藏*/
  130. .hide {
  131. display: none !important;
  132. }
  133. /*字颜色*/
  134. .icon {
  135. font-size: inherit;
  136. }
  137. .fc_3 {
  138. color: #333;
  139. }
  140. .fc_6 {
  141. color: #666;
  142. }
  143. .fc_9 {
  144. color: #999;
  145. }
  146. /*背景*/
  147. .bg_fff {
  148. background-color: #fff;
  149. }
  150. /*移动*/
  151. .late_xy {
  152. -webkit-transform: translate(-50%, -50%);
  153. -moz-transform: translate(-50%, -50%);
  154. -o-transform: translate(-50%, -50%);
  155. -ms-transform: translate(-50%, -50%);
  156. transform: translate(-50%, -50%);
  157. }
  158. .late_x {
  159. -webkit-transform: translateX(-50%);
  160. -moz-transform: translateX(-50%);
  161. -o-transform: translateX(-50%);
  162. -ms-transform: translateX(-50%);
  163. transform: translateX(-50%);
  164. }
  165. .late_y {
  166. -webkit-transform: translateY(-50%);
  167. -moz-transform: translateY(-50%);
  168. -o-transform: translateY(-50%);
  169. -ms-transform: translateY(-50%);
  170. transform: translateY(-50%);
  171. }
  172. /*定位*/
  173. .abs {
  174. position: absolute;
  175. }
  176. .rel {
  177. position: relative;
  178. }
  179. .fixed {
  180. position: fixed;
  181. }
  182. /*垂直居中*/
  183. .abs_xy {
  184. position: absolute;
  185. top: 50%;
  186. left: 50%;
  187. -webkit-transform: translate(-50%, -50%);
  188. -moz-transform: translate(-50%, -50%);
  189. -o-transform: translate(-50%, -50%);
  190. -ms-transform: translate(-50%, -50%);
  191. transform: translate(-50%, -50%);
  192. }
  193. .fiexd_xy {
  194. position: fixed;
  195. top: 50%;
  196. left: 50%;
  197. -webkit-transform: translate(-50%, -50%);
  198. -moz-transform: translate(-50%, -50%);
  199. -o-transform: translate(-50%, -50%);
  200. -ms-transform: translate(-50%, -50%);
  201. transform: translate(-50%, -50%);
  202. }
  203. .abs_x {
  204. position: absolute;
  205. left: 50%;
  206. -webkit-transform: translate(-50%, 0%);
  207. -moz-transform: translate(-50%, 0%);
  208. -o-transform: translate(-50%, 0%);
  209. -ms-transform: translate(-50%, 0%);
  210. transform: translate(-50%, 0%);
  211. }
  212. .abs_y {
  213. position: absolute;
  214. top: 50%;
  215. -webkit-transform: translate(0%, -50%);
  216. -moz-transform: translate(0%, -50%);
  217. -o-transform: translate(0%, -50%);
  218. -ms-transform: translate(0%, -50%);
  219. transform: translate(0%, -50%);
  220. }
  221. .fixed_x {
  222. position: fixed;
  223. left: 50%;
  224. -webkit-transform: translate(-50%, 0%);
  225. -moz-transform: translate(-50%, 0%);
  226. -o-transform: translate(-50%, 0%);
  227. -ms-transform: translate(-50%, 0%);
  228. transform: translate(-50%, 0%);
  229. }
  230. .fixed_y {
  231. position: fixed;
  232. top: 50%;
  233. -webkit-transform: translate(0%, -50%);
  234. -moz-transform: translate(0%, -50%);
  235. -o-transform: translate(0%, -50%);
  236. -ms-transform: translate(0%, -50%);
  237. transform: translate(0%, -50%);
  238. }
  239. .abs_center {
  240. position: absolute;
  241. left: 0;
  242. right: 0;
  243. top: 0;
  244. bottom: 0;
  245. margin: auto;
  246. }
  247. .fixed_center {
  248. position: fixed;
  249. left: 0;
  250. right: 0;
  251. top: 0;
  252. bottom: 0;
  253. margin: auto;
  254. }
  255. /*行省略*/
  256. /*-webkit-,-moz-,-o-,-ms-*/
  257. .line_one {
  258. overflow: hidden;
  259. text-overflow: ellipsis;
  260. white-space: nowrap;
  261. }
  262. .line_1 {
  263. display: -webkit-box;
  264. display: -moz-box;
  265. display: -ms-box;
  266. display: -o-box;
  267. -webkit-box-orient: vertical;
  268. -moz-box-orient: vertical;
  269. -ms-box-orient: vertical;
  270. -o-box-orient: vertical;
  271. box-orient: vertical;
  272. -webkit-line-clamp: 1;
  273. -moz-line-clamp: 1;
  274. -ms-line-clamp: 1;
  275. -o-line-clamp: 1;
  276. line-clamp: 1;
  277. overflow: hidden;
  278. }
  279. .line_2 {
  280. display: -webkit-box;
  281. display: -moz-box;
  282. display: -ms-box;
  283. display: -o-box;
  284. -webkit-box-orient: vertical;
  285. -moz-box-orient: vertical;
  286. -ms-box-orient: vertical;
  287. -o-box-orient: vertical;
  288. box-orient: vertical;
  289. -webkit-line-clamp: 2;
  290. -moz-line-clamp: 2;
  291. -ms-line-clamp: 2;
  292. -o-line-clamp: 2;
  293. line-clamp: 2;
  294. overflow: hidden;
  295. }
  296. .line_3 {
  297. display: -webkit-box;
  298. display: -moz-box;
  299. display: -ms-box;
  300. display: -o-box;
  301. -webkit-box-orient: vertical;
  302. -moz-box-orient: vertical;
  303. -ms-box-orient: vertical;
  304. -o-box-orient: vertical;
  305. box-orient: vertical;
  306. -webkit-line-clamp: 3;
  307. -moz-line-clamp: 3;
  308. -ms-line-clamp: 3;
  309. -o-line-clamp: 3;
  310. line-clamp: 3;
  311. overflow: hidden;
  312. }
  313. .line_4 {
  314. display: -webkit-box;
  315. display: -moz-box;
  316. display: -ms-box;
  317. display: -o-box;
  318. -webkit-box-orient: vertical;
  319. -moz-box-orient: vertical;
  320. -ms-box-orient: vertical;
  321. -o-box-orient: vertical;
  322. box-orient: vertical;
  323. -webkit-line-clamp: 4;
  324. -moz-line-clamp: 4;
  325. -ms-line-clamp: 4;
  326. -o-line-clamp: 4;
  327. line-clamp: 4;
  328. overflow: hidden;
  329. }
  330. .line_5 {
  331. display: -webkit-box;
  332. display: -moz-box;
  333. display: -ms-box;
  334. display: -o-box;
  335. -webkit-box-orient: vertical;
  336. -moz-box-orient: vertical;
  337. -ms-box-orient: vertical;
  338. -o-box-orient: vertical;
  339. box-orient: vertical;
  340. -webkit-line-clamp: 5;
  341. -moz-line-clamp: 5;
  342. -ms-line-clamp: 5;
  343. -o-line-clamp: 5;
  344. line-clamp: 5;
  345. overflow: hidden;
  346. }
  347. /*block*/
  348. .block {
  349. display: block;
  350. }
  351. .inblock {
  352. display: inline-block;
  353. }
  354. /*Flexible Box*/
  355. .flex {
  356. display: -webkit-box;
  357. display: -webkit-flex;
  358. display: -moz-box;
  359. display: -ms-flexbox;
  360. display: flex;
  361. }
  362. .inflex {
  363. display: inline-box !important;
  364. display: -webkit-inline-box !important;
  365. display: -webkit-inline-flex !important;
  366. display: -moz-box !important;
  367. display: -ms-inline-flexbox !important;
  368. display: inline-flex !important;
  369. }
  370. /*单轴*/
  371. .ai_center {
  372. -webkit-align-items: center;
  373. -moz-align-items: center;
  374. -ms-align-items: center;
  375. -o-align-items: center;
  376. align-items: center;
  377. }
  378. .ai_start {
  379. /*默认*/
  380. -webkit-align-items: flex-start;
  381. -moz-align-items: flex-start;
  382. -ms-align-items: flex-start;
  383. -o-align-items: flex-start;
  384. align-items: flex-start;
  385. }
  386. .ai_end {
  387. -webkit-align-items: flex-end;
  388. -moz-align-items: flex-end;
  389. -ms-align-items: flex-end;
  390. -o-align-items: flex-end;
  391. align-items: flex-end;
  392. }
  393. .ai_base {
  394. -webkit-align-items: baseline;
  395. -moz-align-items: baseline;
  396. -ms-align-items: baseline;
  397. -o-align-items: baseline;
  398. align-items: baseline;
  399. }
  400. .ai_stretch {
  401. -webkit-align-items: stretch;
  402. -moz-align-items: stretch;
  403. -ms-align-items: stretch;
  404. -o-align-items: stretch;
  405. align-items: stretch;
  406. }
  407. /*左右对齐*/
  408. .jc_center {
  409. -webkit-justify-content: center;
  410. -moz-justify-content: center;
  411. -ms-justify-content: center;
  412. -o-justify-content: center;
  413. justify-content: center;
  414. }
  415. .jc_between {
  416. -webkit-justify-content: space-between;
  417. -moz-justify-content: space-between;
  418. -ms-justify-content: space-between;
  419. -o-justify-content: space-between;
  420. justify-content: space-between;
  421. }
  422. .jc_around {
  423. -webkit-justify-content: space-around;
  424. -moz-justify-content: space-around;
  425. -ms-justify-content: space-around;
  426. -o-justify-content: space-around;
  427. justify-content: space-around;
  428. }
  429. .jc_end {
  430. -webkit-justify-content: flex-end;
  431. -moz-justify-content: flex-end;
  432. -ms-justify-content: flex-end;
  433. -o-justify-content: flex-end;
  434. justify-content: flex-end;
  435. }
  436. /*换行方式*/
  437. .fw_no {
  438. -webkit-flex-wrap: nowrap;
  439. -moz-flex-wrap: nowrap;
  440. -ms-flex-wrap: nowrap;
  441. -o-flex-wrap: nowrap;
  442. flex-wrap: nowrap;
  443. }
  444. .fw_wrap {
  445. -webkit-flex-wrap: wrap;
  446. -moz-flex-wrap: wrap;
  447. -ms-flex-wrap: wrap;
  448. -o-flex-wrap: wrap;
  449. flex-wrap: wrap;
  450. }
  451. .fw_reverse {
  452. -webkit-flex-wrap: wrap-reverse;
  453. -moz-flex-wrap: wrap-reverse;
  454. -ms-flex-wrap: wrap-reverse;
  455. -o-flex-wrap: wrap-reverse;
  456. flex-wrap: wrap-reverse;
  457. }
  458. /*多轴 上中下对齐方式*/
  459. .ac_center {
  460. -webkit-align-content: center;
  461. -moz-align-content: center;
  462. -ms-align-content: center;
  463. -o-align-content: center;
  464. align-content: center;
  465. }
  466. .ac_start {
  467. -webkit-align-content: flex-start;
  468. -moz-align-content: flex-start;
  469. -ms-align-content: flex-start;
  470. -o-align-content: flex-start;
  471. align-content: flex-start;
  472. }
  473. .ac_end {
  474. -webkit-align-content: flex-end;
  475. -moz-align-content: flex-end;
  476. -ms-align-content: flex-end;
  477. -o-align-content: flex-end;
  478. align-content: flex-end;
  479. }
  480. .ac_between {
  481. -webkit-align-content: space-between;
  482. -moz-align-content: space-between;
  483. -ms-align-content: space-between;
  484. -o-align-content: space-between;
  485. align-content: space-between;
  486. }
  487. .ac_around {
  488. -webkit-align-content: space-around;
  489. -moz-align-content: space-around;
  490. -ms-align-content: space-around;
  491. -o-align-content: space-around;
  492. align-content: space-around;
  493. }
  494. .ac_stretch {
  495. -webkit-align-content: stretch;
  496. -moz-align-content: stretch;
  497. -ms-align-content: stretch;
  498. -o-align-content: stretch;
  499. align-content: stretch;
  500. }
  501. /*主轴的方向*/
  502. .fd_r {
  503. -webkit-flex-direction: row;
  504. -moz-flex-direction: row;
  505. -ms-flex-direction: row;
  506. -o-flex-direction: row;
  507. flex-direction: row;
  508. }
  509. .fd_rr {
  510. -webkit-flex-direction: row-reverse;
  511. -moz-flex-direction: row-reverse;
  512. -ms-flex-direction: row-reverse;
  513. -o-flex-direction: row-reverse;
  514. flex-direction: row-reverse;
  515. }
  516. .fd_c {
  517. -webkit-flex-direction: column;
  518. -moz-flex-direction: column;
  519. -ms-flex-direction: column;
  520. -o-flex-direction: column;
  521. flex-direction: column;
  522. }
  523. .fd_cr {
  524. -webkit-flex-direction: column-reverse;
  525. -moz-flex-direction: column-reverse;
  526. -ms-flex-direction: column-reverse;
  527. -o-flex-direction: column-reverse;
  528. flex-direction: column-reverse;
  529. }
  530. /*项目属性*/
  531. .flex1 {
  532. -prefix-box-flex: 1;
  533. -webkit-box-flex: 1;
  534. -webkit-flex: 1;
  535. -moz-box-flex: 1;
  536. -ms-flex: 1;
  537. flex: 1;
  538. }
  539. .flex2 {
  540. -prefix-box-flex: 2;
  541. -webkit-box-flex: 2;
  542. -webkit-flex: 2;
  543. -moz-box-flex: 2;
  544. -ms-flex: 2;
  545. flex: 2;
  546. }
  547. .as_auto {
  548. -webkit-align-self: auto;
  549. -moz-align-self: auto;
  550. -ms-align-self: auto;
  551. -o-align-self: auto;
  552. align-self: auto;
  553. }
  554. .as_center {
  555. -webkit-align-self: center;
  556. -moz-align-self: center;
  557. -ms-align-self: center;
  558. -o-align-self: center;
  559. align-self: center;
  560. }
  561. .as_start {
  562. -webkit-align-self: flex-start;
  563. -moz-align-self: flex-start;
  564. -ms-align-self: flex-start;
  565. -o-align-self: flex-start;
  566. align-self: flex-start;
  567. }
  568. .as_end {
  569. -webkit-align-self: flex-end;
  570. -moz-align-self: flex-end;
  571. -ms-align-self: flex-end;
  572. -o-align-self: flex-end;
  573. align-self: flex-end;
  574. }
  575. .as_base {
  576. -webkit-align-self: baseline;
  577. -moz-align-self: baseline;
  578. -ms-align-self: baseline;
  579. -o-align-self: baseline;
  580. align-self: baseline;
  581. }
  582. .as_stretch {
  583. -webkit-align-self: stretch;
  584. -moz-align-self: stretch;
  585. -ms-align-self: stretch;
  586. -o-align-self: stretch;
  587. align-self: stretch;;
  588. }
  589. /* 是否允许子元素伸缩 */
  590. .flex-item {
  591. flex-grow: 1;;
  592. }
  593. /* 子元素的显示次序 */
  594. .flex-order {
  595. order: 1;;
  596. }
  597. /**/