From aa52a56bcf73ded50f136377f5c685dd3e93181f Mon Sep 17 00:00:00 2001 From: userGyl Date: Fri, 30 Jan 2026 11:36:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E7=9B=B8=E5=85=B3=E7=9A=84?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ln_jq_app/assets/html/map.html | 145 +++++++++++++++++++++++++++++---- 1 file changed, 131 insertions(+), 14 deletions(-) diff --git a/ln_jq_app/assets/html/map.html b/ln_jq_app/assets/html/map.html index a9dd60b..6576769 100644 --- a/ln_jq_app/assets/html/map.html +++ b/ln_jq_app/assets/html/map.html @@ -32,7 +32,7 @@ /* --- 搜索栏样式 --- */ #search-box { position: absolute; - top: 10px; + top: 40px; left: 10px; right: 10px; z-index: 100; @@ -74,7 +74,7 @@ /* --- 导航结果面板 (底部弹出) --- */ #panel { position: fixed; - bottom: 0; + bottom: 75px; left: 0; width: 100%; height: 35%; @@ -94,7 +94,7 @@ #location-btn { position: fixed; right: 10px; - bottom: 50px; + bottom: 75px; /* 默认位置 */ width: 44px; height: 44px; @@ -121,9 +121,22 @@ fill: #555; } + /* --- 调整比例尺位置 --- */ +.amap-scalecontrol { + /* 初始状态:避开底部的定位按钮或留出安全间距 */ + bottom: 80px !important; + left: 10px !important; + transition: bottom 0.3s ease; /* 增加平滑动画 */ +} + +/* --- 当路径规划面板显示时,比例尺自动上移 --- */ +body.panel-active .amap-scalecontrol { + bottom: 38% !important; /* 移动到面板上方 (面板高度35% + 3%间距) */ +} + /* --- 关键:当 body 有 panel-active 类时,按钮上移 --- */ body.panel-active #location-btn { - bottom: 38%; + bottom: 45%; /* 对应 #panel 的 height + 一点间距 */ } @@ -167,7 +180,7 @@