flex.css 12 KB

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