index.wxss 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. .poster {
  2. position: relative;
  3. width: 100%;
  4. height: 100vh;
  5. background: #c11f1b;
  6. }
  7. .poster .backgroundImg {
  8. position: absolute;
  9. top: calc(constant(safe-area-inset-bottom) / 2);
  10. top: calc(env(safe-area-inset-bottom) / 2);
  11. width: 100%;
  12. height: calc(100% - constant(safe-area-inset-bottom));
  13. height: calc(100% - env(safe-area-inset-bottom));
  14. }
  15. .poster .background-door {
  16. position: absolute;
  17. bottom: calc(constant(safe-area-inset-bottom) / 2);
  18. bottom: calc(env(safe-area-inset-bottom) / 2);
  19. width: 100%;
  20. height: calc(55% - constant(safe-area-inset-bottom));
  21. height: calc(55% - env(safe-area-inset-bottom));
  22. perspective: 500px;
  23. }
  24. .poster .background-door .background-door__left,
  25. .poster .background-door .background-door__right {
  26. position: absolute;
  27. width: 50%;
  28. height: 100%;
  29. perspective: 500px;
  30. }
  31. .poster .background-door .background-door__right {
  32. right: 0;
  33. }
  34. .poster .background-door image {
  35. position: absolute;
  36. height: 100%;
  37. transform-origin: right center;
  38. }
  39. .poster .background-door .background-door__left image {
  40. right: 0;
  41. transform-origin: left center;
  42. }