mainLand.scss 3.4 KB

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