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 @@