redpack.wxss 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. .redPack {
  2. position: fixed;
  3. right: 30rpx;
  4. bottom: 180rpx;
  5. z-index: 99;
  6. width: 82rpx;
  7. height: 100rpx;
  8. transition: right 0.4s;
  9. }
  10. .slide-right {
  11. /* right: -75rpx; */
  12. transition: right 0.2s;
  13. }
  14. .redPack {
  15. animation: huang 1s ease-in-out 0s infinite;
  16. }
  17. .redPack image {
  18. position: absolute;
  19. display: flex;
  20. }
  21. .icon__redpack {
  22. height: 100rpx;
  23. width: 82rpx;
  24. }
  25. .redpack__text {
  26. bottom: 20rpx;
  27. color: #FFE583;
  28. font-size: 20rpx;
  29. font-weight: bold;
  30. position: absolute;
  31. text-align: center;
  32. width: 100%;
  33. z-index: 1;
  34. }
  35. @keyframes huang {
  36. from {
  37. transform: rotate(0);
  38. }
  39. 25% {
  40. transform: rotate(30deg);
  41. }
  42. 50% {
  43. transform: rotate(-30deg);
  44. }
  45. 75% {
  46. transform: rotate(0);
  47. }
  48. 80% {
  49. margin-top: -1rpx;
  50. }
  51. 85% {
  52. margin-top: 0;
  53. }
  54. }
  55. .redPack .bg1 {
  56. width: 150rpx;
  57. height: 145rpx;
  58. bottom: 0;
  59. left: 0;
  60. }
  61. .redPack .bg2 {
  62. width: 133rpx;
  63. height: 133rpx;
  64. left: 50%;
  65. margin-left: -66.5rpx;
  66. animation: heart 1.3s ease-in-out 0s infinite alternate;
  67. }
  68. .redPack .bg3 {
  69. width: 150rpx;
  70. height: 102rpx;
  71. bottom: 0;
  72. left: 0;
  73. }
  74. @keyframes heart {
  75. from {
  76. transform: translate(0, -5rpx);
  77. }
  78. to {
  79. transform: translate(0, 15rpx);
  80. }
  81. }
  82. .redPack .text {
  83. position: absolute;
  84. bottom: 15rpx;
  85. display: flex;
  86. justify-content: center;
  87. align-items: flex-end;
  88. width: 100%;
  89. font-size: 44rpx;
  90. line-height: 62rpx;
  91. font-weight: 600;
  92. color: #fff;
  93. white-space: nowrap;
  94. }
  95. .redPack .text text {
  96. font-size: 24rpx;
  97. font-weight: 400;
  98. line-height: 50rpx;
  99. padding-left: 6rpx;
  100. padding-bottom: 2rpx;
  101. }