uni-events-helper-wx
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

130 lines
3.0 KiB

3 years ago
3 years ago
  1. @import './mixin/flex.scss'; // flex(主轴,交叉轴,方向,换行,多轴线对齐) / flex-self(对齐,(布满||固定),顺序)
  2. @import './mixin/text-overflow.scss'; // 文本格式化超出省略号 参数:宽度,单行/多行
  3. @import './mixin/position-absolute.scss'; // 绝对定位 参数:上,右,下,左
  4. @import './mixin/triangle.scss'; // 画三角形 参数:宽度,朝向,颜色
  5. @import './mixin/hr.scss'; // 添加分割线 参数:位置,间隔
  6. @import './mixin/price-before.scss'; // 价格¥前加
  7. /*colorui css */
  8. @import "static/colorui/main.css";
  9. @import "static/colorui/icon.css";
  10. /*uview-ui css */
  11. // @import "uview-ui/index.scss";
  12. page {
  13. min-height: 100%;
  14. background-color: #f7f7f7;
  15. }
  16. /*flex布局(colorui里面也有相关基础样式)*/
  17. /* x水平排列*/
  18. .x-f {
  19. display: flex;
  20. align-items: center;
  21. }
  22. /*x两端且水平居中*/
  23. .x-bc {
  24. display: flex;
  25. justify-content: space-between;
  26. align-items: center;
  27. }
  28. /*x平分且水平居中*/
  29. .x-ac {
  30. display: flex;
  31. justify-content: space-around;
  32. align-items: center;
  33. }
  34. /*x水平靠上对齐*/
  35. .x-start {
  36. display: flex;
  37. align-items: flex-start;
  38. }
  39. /*x水平靠下对齐*/
  40. .x-end {
  41. display: flex;
  42. align-items: flex-end;
  43. }
  44. /*上下左右居中*/
  45. .x-c {
  46. display: flex;
  47. justify-content: center;
  48. align-items: center;
  49. }
  50. /*y竖直靠左*/
  51. .y-start {
  52. display: flex;
  53. flex-direction: column;
  54. align-items: flex-start;
  55. }
  56. /*y竖直靠右*/
  57. .y-end {
  58. display: flex;
  59. flex-direction: column;
  60. align-items: flex-end;
  61. }
  62. /*y竖直居中*/
  63. .y-f {
  64. display: flex;
  65. flex-direction: column;
  66. align-items: center;
  67. }
  68. /* y竖直两端*/
  69. .y-b {
  70. display: flex;
  71. flex-direction: column;
  72. justify-content: space-between;
  73. }
  74. /*y竖直两端居中*/
  75. .y-bc {
  76. display: flex;
  77. flex-direction: column;
  78. align-items: center;
  79. justify-content: space-between;
  80. }
  81. //常用flex公共代码
  82. .flex_row{
  83. display: flex;
  84. flex-direction: row;
  85. flex-wrap: nowrap;
  86. // flex-flow: row nowrap;
  87. justify-content: center;
  88. align-items: center;
  89. }
  90. .flex_col{
  91. display: flex;
  92. flex-direction: column;
  93. flex-wrap: nowrap;
  94. // flex-flow: column nowrap; //部分环境不支持简写
  95. justify-content: center; //主轴上的对齐方式
  96. align-items: center; //交叉轴上如何对齐
  97. }
  98. .flex_col.flex_wrap{flex-wrap: wrap;}
  99. .flex_row.flex_wrap{flex-wrap: wrap;}
  100. //覆盖主轴属性
  101. .flex_between{justify-content: space-between;}
  102. .flex_around{justify-content: space-around;}
  103. .flex_start{justify-content: flex-start;}
  104. .flex_end{justify-content: flex-end;}
  105. //覆盖交叉轴属性
  106. .flex_between_y{align-items: space-between;}
  107. .flex_around_y{align-items: space-around;}
  108. .flex_start_y{align-items: flex-start;}
  109. .flex_end_y{align-items: flex-end;}
  110. .text-maxline-one {
  111. text-overflow: ellipsis;
  112. -webkit-line-clamp: 1;
  113. -webkit-box-orient: vertical;
  114. word-break: break-all;
  115. overflow: hidden;
  116. display: -webkit-box;
  117. }