合伙人运营小程序
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.

badge.wxss 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. .t-float-left {
  2. float: left;
  3. }
  4. .t-float-right {
  5. float: right;
  6. }
  7. @keyframes tdesign-fade-out {
  8. from {
  9. opacity: 1;
  10. }
  11. to {
  12. opacity: 0;
  13. }
  14. }
  15. .hotspot-expanded.relative {
  16. position: relative;
  17. }
  18. .hotspot-expanded::after {
  19. content: '';
  20. display: block;
  21. position: absolute;
  22. left: 0;
  23. top: 0;
  24. right: 0;
  25. bottom: 0;
  26. transform: scale(1.5);
  27. }
  28. .t-badge {
  29. position: relative;
  30. display: inline-block;
  31. vertical-align: top;
  32. }
  33. .t-badge--basic {
  34. z-index: 100;
  35. padding: 0 var(--td-badge-basic-padding, 8rpx);
  36. font-size: var(--td-badge-font-size, var(--td-font-size-xs, var(--td-font-size, 20rpx)));
  37. color: var(--td-badge-text-color, var(--td-font-white-1, #ffffff));
  38. background-color: var(--td-badge-bg-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
  39. text-align: center;
  40. height: var(--td-badge-basic-height, 32rpx);
  41. line-height: var(--td-badge-basic-height, 32rpx);
  42. font-weight: var(--td-badge-font-weight, 600);
  43. border-radius: var(--td-badge-border-radius, 4rpx);
  44. }
  45. .t-badge--dot {
  46. height: var(--td-badge-dot-size, 16rpx);
  47. border-radius: 50%;
  48. min-width: var(--td-badge-dot-size, 16rpx);
  49. padding: 0;
  50. }
  51. .t-badge--count {
  52. min-width: var(--td-badge-basic-width, 32rpx);
  53. white-space: nowrap;
  54. box-sizing: border-box;
  55. }
  56. .t-badge--circle {
  57. border-radius: calc(var(--td-badge-basic-height, 32rpx) / 2);
  58. }
  59. .t-badge__ribbon-outer {
  60. position: absolute;
  61. top: 0;
  62. right: 0;
  63. }
  64. .t-badge__ribbon--before,
  65. .t-badge__ribbon--after {
  66. content: '';
  67. position: absolute;
  68. width: 0;
  69. height: 0;
  70. bottom: 0;
  71. border-bottom: var(--td-badge-basic-height, 32rpx) solid var(--td-badge-bg-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
  72. }
  73. .t-badge__ribbon--before {
  74. left: calc(-1 * var(--td-badge-basic-height, 32rpx) + 1rpx);
  75. border-left: var(--td-badge-basic-height, 32rpx) solid transparent;
  76. }
  77. .t-badge__ribbon--after {
  78. right: calc(-1 * var(--td-badge-basic-height, 32rpx) + 1rpx);
  79. border-right: var(--td-badge-basic-height, 32rpx) solid transparent;
  80. }
  81. .t-badge--ribbon {
  82. display: inline-block;
  83. transform: rotate(45deg);
  84. transform-origin: center center;
  85. border-radius: 0;
  86. }
  87. .t-badge--bubble {
  88. border-radius: var(--td-badge-bubble-border-radius, 20rpx 20rpx 20rpx 1px);
  89. }
  90. .t-badge--large {
  91. font-size: var(--td-badge-large-font-size, var(--td-font-size-s, 24rpx));
  92. height: var(--td-badge-large-height, 40rpx);
  93. min-width: var(--td-badge-large-height, 40rpx);
  94. line-height: var(--td-badge-large-height, 40rpx);
  95. padding: 0 var(--td-badge-large-padding, 10rpx);
  96. }
  97. .t-badge--large.t-badge--circle {
  98. border-radius: calc(var(--td-badge-large-height, 40rpx) / 2);
  99. }
  100. .t-badge__content:not(:empty) + .t-has-count {
  101. transform: translate(-50%, -50%);
  102. position: absolute;
  103. left: 100%;
  104. top: 0;
  105. }
  106. .t-badge__content-text {
  107. display: block;
  108. line-height: 48rpx;
  109. color: var(--td-badge-content-text-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
  110. }