redpack.wxss 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 image {
  15. position: absolute;
  16. display: flex;
  17. animation: huang 1s ease-in-out 0s infinite;
  18. }
  19. @keyframes huang {
  20. from {
  21. transform: rotate(0);
  22. }
  23. 25% {
  24. transform: rotate(30deg);
  25. }
  26. 50% {
  27. transform: rotate(-30deg);
  28. }
  29. 75% {
  30. transform: rotate(0);
  31. }
  32. 80% {
  33. margin-top: -1rpx;
  34. }
  35. 85% {
  36. margin-top: 0;
  37. }
  38. }
  39. .redPack .bg1 {
  40. width: 150rpx;
  41. height: 145rpx;
  42. bottom: 0;
  43. left: 0;
  44. }
  45. .redPack .bg2 {
  46. width: 133rpx;
  47. height: 133rpx;
  48. left: 50%;
  49. margin-left: -66.5rpx;
  50. animation: heart 1.3s ease-in-out 0s infinite alternate;
  51. }
  52. .redPack .bg3 {
  53. width: 150rpx;
  54. height: 102rpx;
  55. bottom: 0;
  56. left: 0;
  57. }
  58. @keyframes heart {
  59. from {
  60. transform: translate(0, -5rpx);
  61. }
  62. to {
  63. transform: translate(0, 15rpx);
  64. }
  65. }
  66. .redPack .text {
  67. position: absolute;
  68. bottom: 15rpx;
  69. display: flex;
  70. justify-content: center;
  71. align-items: flex-end;
  72. width: 100%;
  73. font-size: 44rpx;
  74. line-height: 62rpx;
  75. font-weight: 600;
  76. color: #fff;
  77. white-space: nowrap;
  78. }
  79. .redPack .text text {
  80. font-size: 24rpx;
  81. font-weight: 400;
  82. line-height: 50rpx;
  83. padding-left: 6rpx;
  84. padding-bottom: 2rpx;
  85. }
  86. .icon__redpack {
  87. height: 100rpx;
  88. width: 82rpx;
  89. }