global.scss 2.7 KB

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