homeLand.scss 1.5 KB

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