redpack.wxss 1.6 KB

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