index.scss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. @mixin theme($property, $variable) {
  2. $theme: (
  3. 'dialer_text_color': #ffb400,
  4. 'dialer_prize_font_size': 12px,
  5. 'dialer_prize_name_padding': 8px,
  6. 'dialer_prize_inner_padding': 8px,
  7. 'dialer_prize_image_size': 36px
  8. );
  9. $value: map-get($theme, $variable);
  10. #{$property}: $value;
  11. /* #ifndef APP-IOS || APP-ANDROID */
  12. $css-variable: var(--#{$variable}, #{$value});
  13. #{$property}: #{$css-variable};
  14. /* #endif */
  15. }
  16. .l-dialer {
  17. position: relative;
  18. &__inner {
  19. width: 100%;
  20. height: 100%;
  21. flex:1;
  22. position: relative;
  23. @include theme('color', 'dialer_text_color');
  24. background-repeat: no-repeat;
  25. background-size: cover;
  26. box-sizing: border-box;
  27. border-radius: 999px;
  28. overflow: hidden;
  29. // transition: transform 3s ease;
  30. // transform-origin: 50% 50%;
  31. transition-property: transform;
  32. transition-timing-function: cubic-bezier(0.250, 0.460, 0.455, 0.995);
  33. &-border {
  34. position: absolute;
  35. left: 0;
  36. top: 0;
  37. bottom: 0;
  38. right: 0;
  39. }
  40. &-wrap {
  41. position: relative;
  42. z-index: 1;
  43. width: 100%;
  44. height: 100%;
  45. border-radius: 999px;
  46. overflow: hidden;
  47. box-sizing: border-box;
  48. // background: red;
  49. /* #ifndef APP-ANDROID */
  50. &::after {
  51. position: absolute;
  52. left: 0;
  53. top: 0;
  54. bottom: 0;
  55. right: 0;
  56. content: '';
  57. border-radius: 50%;
  58. box-shadow: 0 0 20rpx currentColor inset;
  59. }
  60. /* #endif */
  61. }
  62. &-item {
  63. overflow: hidden;
  64. position: absolute;
  65. top: -50%;
  66. left: 50%;
  67. width: 100%;
  68. height: 100%;
  69. transform-origin: 0 100%;
  70. }
  71. &-content {
  72. position: absolute;
  73. @include theme('padding-top', 'dialer_prize_inner_padding');
  74. box-sizing: border-box;
  75. width: 100%;
  76. height: 100%;
  77. left: -50%;
  78. bottom: -50%;
  79. display: flex;
  80. flex-direction: column;
  81. align-items: center;
  82. }
  83. &-name {
  84. @include theme('padding-top', 'dialer_prize_name_padding');
  85. @include theme('padding-bottom', 'dialer_prize_name_padding');
  86. @include theme('font-size', 'dialer_prize_font_size');
  87. @include theme('color', 'dialer_text_color');
  88. }
  89. &-img {
  90. @include theme('width', 'dialer_prize_image_size');
  91. @include theme('height', 'dialer_prize_image_size');
  92. }
  93. }
  94. &__pointer {
  95. position: absolute;
  96. left: 50%;
  97. top: 50%;
  98. transform: translate(-50%, -50%);
  99. z-index: 1;
  100. }
  101. }
  102. /* #ifndef APP-IOS || APP-ANDROID */
  103. .heart {
  104. animation: heart 1s infinite;
  105. }
  106. @keyframes heart {
  107. 0% {
  108. transform: scale(1);
  109. }
  110. 25% {
  111. transform: scale(1.03);
  112. }
  113. to {
  114. transform: scale(1);
  115. }
  116. }
  117. /* #endif */