mainLand.scss 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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, #87CEEB, #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: 1536rpx; /* 地图比屏幕大 */
  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. width: 100%;
  43. height: 100%;
  44. z-index: 3; /* 最上层 */
  45. pointer-events: none; /* 允许穿透点击,但内部元素可交互 */
  46. }
  47. /* UI层内部元素需要启用交互 */
  48. .ui-content {
  49. pointer-events: none; /* 重新启用交互 */
  50. bottom: 150px;
  51. padding-top: 50px;
  52. height: 120px;
  53. }
  54. /* 示例按钮样式 */
  55. .dialog-button {
  56. pointer-events: auto; /* 重新启用交互 */
  57. background: white;
  58. // bottom: 150px;
  59. padding: 10px 20px;
  60. border-radius: 5px;
  61. box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  62. }
  63. text {
  64. font-size: 16px;
  65. color: #333;
  66. }
  67. }