global.scss 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /* 文字缩略 $line: 保留几行文章 */
  2. @mixin ellipsis($line: 1) {
  3. overflow: hidden;
  4. text-overflow: ellipsis;
  5. display: -webkit-box;
  6. -webkit-line-clamp: $line;
  7. -webkit-box-orient: vertical;
  8. }
  9. // page {
  10. // -webkit-filter: grayscale(100%);
  11. // -moz-filter: grayscale(100%);
  12. // -o-filter: grayscale(100%);
  13. // filter: grayscale(100%);
  14. // filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
  15. // }
  16. // flex布局
  17. .cm-flex-center {
  18. display: flex;
  19. justify-content: center;
  20. align-items: center;
  21. }
  22. .cm-flex-between {
  23. display: flex;
  24. justify-content: space-between;
  25. align-items: center;
  26. }
  27. .cm-flex-around {
  28. display: flex;
  29. justify-content: space-around;
  30. align-items: center;
  31. }
  32. // 标签
  33. .tags {
  34. .tag {
  35. display: inline-block;
  36. margin-right: 8rpx;
  37. height: 30rpx;
  38. text-align: center;
  39. line-height: 30rpx;
  40. font-size: 18rpx;
  41. padding: 0 4rpx;
  42. vertical-align: middle;
  43. &.cx {
  44. // 促销 自营标签
  45. background: #f83c6c;
  46. border-radius: 4rpx;
  47. color: #ffffff;
  48. }
  49. &.hd {
  50. // 活动价标签
  51. width: 80rpx;
  52. box-sizing: border-box;
  53. padding: 0;
  54. background: url(https://static.caimei365.com/app/mini-hehe/icon/icon-active.png) top center no-repeat;
  55. background-size: 80rpx 30rpx;
  56. color: #f83c6c;
  57. }
  58. &.pt {
  59. // 拼团价标签
  60. background: linear-gradient(270deg, #ff457b 0%, #b03bb8 51%, #6431f2 100%);
  61. color: #fff;
  62. border-radius: 4rpx;
  63. }
  64. &.other {
  65. // 其他标签
  66. border: 1rpx solid #f83c6c;
  67. height: 28rpx;
  68. line-height: 28rpx;
  69. color: #f83c6c;
  70. border-radius: 4rpx;
  71. max-width: 100%;
  72. white-space: nowrap;
  73. overflow: hidden;
  74. text-overflow: ellipsis;
  75. }
  76. }
  77. }
  78. // 图标默认颜色
  79. .icon {
  80. font-size: 36rpx;
  81. color: #b2b2b2;
  82. &.icon-xuanze {
  83. color: #f83c6c;
  84. }
  85. }
  86. // 列表为空的提示语样式
  87. .empty-tip {
  88. font-size: 24rpx;
  89. line-height: 1.6;
  90. color: #999;
  91. }
  92. .placeholder {
  93. font-size: 28rpx;
  94. color: #999999;
  95. }
  96. .hover-class {
  97. background-color: #eee !important;
  98. }
  99. // thorui 样式
  100. .tui-nodata-fixed {
  101. transform: translate(-50%, -70%) !important;
  102. }
  103. .tui-divider {
  104. .tui-divider-line {
  105. background: #d4d4d4 !important;
  106. }
  107. }
  108. // 定位
  109. .fixed-top {
  110. position: fixed;
  111. z-index: 90;
  112. width: 100%;
  113. left: 0;
  114. top: 0;
  115. }
  116. .fixed-bottom {
  117. position: fixed;
  118. z-index: 90;
  119. width: 100%;
  120. left: 0;
  121. bottom: 0;
  122. }
  123. .sticky-top {
  124. position: sticky;
  125. z-index: 90;
  126. width: 100%;
  127. left: 0;
  128. top: 0;
  129. }
  130. // 清除浮动
  131. .clearfix::after {
  132. content: '';
  133. display: block;
  134. clear: both;
  135. }