homeLand.scss 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. .home-land-container {
  2. width: 100%;
  3. height: 100vh;
  4. overflow: hidden;
  5. position: relative;
  6. .scroll-container {
  7. width: 100%;
  8. height: 100%;
  9. position: relative;
  10. overflow: hidden;
  11. touch-action: pan-x;
  12. }
  13. /* 第三层:背景层 */
  14. .background-layer {
  15. position: fixed;
  16. top: 0;
  17. left: 0;
  18. width: 100%;
  19. height: 100%;
  20. background: linear-gradient(to bottom, #265f9f, #4682B4); /* 渐变背景 */
  21. z-index: 1; /* 最底层 */
  22. user-select: none; /* 禁止选中 */
  23. pointer-events: none; /* 禁止交互 */
  24. }
  25. /* 第二层:地图层(可拖动) */
  26. .map-layer {
  27. position: fixed;
  28. bottom: 0;
  29. left: 0;
  30. width: 1536rpx; /* 地图比屏幕大 */
  31. height: 100%;
  32. z-index: 2; /* 中间层 */
  33. cursor: grab; /* 拖动光标 */
  34. }
  35. /* 第一层:UI层(最上层) */
  36. .ui-layer {
  37. position: fixed;
  38. top: 0;
  39. left: 0;
  40. right: 0;
  41. bottom: 0;
  42. pointer-events: none;
  43. z-index: 100;
  44. /* UI层内部元素需要启用交互 */
  45. .ui-content {
  46. position: absolute;
  47. top: 120rpx;
  48. right: 20rpx;
  49. pointer-events: none; /* 默认不接收事件 */
  50. z-index: 101;
  51. display: flex;
  52. flex-direction: column;
  53. align-items: flex-end;
  54. }
  55. .currency-display {
  56. display: flex;
  57. flex-direction: row;
  58. gap: 20rpx;
  59. margin-bottom: 20rpx;
  60. padding: 10rpx;
  61. pointer-events: auto; /* 货币计数器接收事件 */
  62. .currency-item {
  63. min-width: 160rpx;
  64. display: flex;
  65. align-items: center;
  66. background: url('/static/island/UI/money_kuang.png') no-repeat center center;
  67. background-size: 100% 100%;
  68. padding: 12rpx 24rpx;
  69. border-radius: 50rpx;
  70. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  71. .currency-icon {
  72. width: 40rpx;
  73. height: 40rpx;
  74. margin-right: 12rpx;
  75. margin-left: -8rpx;
  76. }
  77. .currency-value {
  78. font-size: 28rpx;
  79. color: #FFFFFF;
  80. font-weight: bold;
  81. text-shadow:
  82. -1px -1px 0 #316624,
  83. 1px -1px 0 #316624,
  84. -1px 1px 0 #316624,
  85. 1px 1px 0 #316624;
  86. }
  87. }
  88. }
  89. .ui-buttons {
  90. display: flex;
  91. flex-direction: column;
  92. gap: 20rpx;
  93. pointer-events: auto; /* 按钮接收事件 */
  94. .ui-button {
  95. background: rgba(255, 255, 255, 0.9);
  96. border: none;
  97. padding: 16rpx 32rpx;
  98. border-radius: 8rpx;
  99. font-size: 28rpx;
  100. color: #333;
  101. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  102. min-width: 120rpx;
  103. &:active {
  104. opacity: 0.8;
  105. transform: scale(0.95);
  106. }
  107. }
  108. }
  109. }
  110. /* 示例按钮样式 */
  111. .dialog-button {
  112. pointer-events: auto; /* 重新启用交互 */
  113. background: white;
  114. padding: 10px 20px;
  115. border-radius: 5px;
  116. box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  117. }
  118. text {
  119. font-size: 16px;
  120. color: #333;
  121. }
  122. }