global.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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: 22rpx;
  34. padding: 0 8rpx;
  35. &.cx {
  36. background: #f83c6c;
  37. border-radius: 4rpx;
  38. color: #ffffff;
  39. }
  40. &.hd {
  41. width: 80rpx;
  42. box-sizing: border-box;
  43. padding: 0;
  44. background: url(https://static.caimei365.com/app/mini-hehe/icon/icon-active.png) top center no-repeat;
  45. background-size: 80rpx 30rpx;
  46. color: #f83c6c;
  47. }
  48. &.pt {
  49. background: linear-gradient(270deg, #ff457b 0%, #b03bb8 51%, #6431f2 100%);
  50. color: #fff;
  51. border-radius: 4rpx;
  52. }
  53. &.other {
  54. border: 1rpx solid #f83c6c;
  55. padding: 0 6rpx;
  56. color: #f83c6c;
  57. border-radius: 4rpx;
  58. }
  59. }
  60. }
  61. // 图标默认颜色
  62. .icon {
  63. font-size: 36rpx;
  64. color: #b2b2b2;
  65. &.icon-xuanze {
  66. color: #f83c6c;
  67. }
  68. }
  69. // 列表为空的提示语样式
  70. .empty-tip {
  71. font-size: 24rpx;
  72. line-height: 1.6;
  73. color: #999;
  74. }
  75. .placeholder {
  76. font-size: 28rpx;
  77. color: #999999;
  78. }
  79. .hover-class {
  80. background-color: #eee !important;
  81. }
  82. // thorui 样式
  83. .tui-nodata-fixed {
  84. transform: translate(-50%, -70%) !important;
  85. }
  86. .tui-divider {
  87. .tui-divider-line {
  88. background: #d4d4d4 !important;
  89. }
  90. }
  91. // 定位
  92. .fixed-top {
  93. position: fixed;
  94. z-index: 90;
  95. width: 100%;
  96. left: 0;
  97. top: 0;
  98. }
  99. .fixed-bottom {
  100. position: fixed;
  101. z-index: 90;
  102. width: 100%;
  103. left: 0;
  104. bottom: 0;
  105. }
  106. .sticky-top{
  107. position: sticky;
  108. z-index: 90;
  109. width: 100%;
  110. left: 0;
  111. top: 0;
  112. }
  113. // 清除浮动
  114. .clearfix::after {
  115. content: '';
  116. display: block;
  117. clear: both;
  118. }