問題描述
我正在使用 leaflet
和 modalcss 在其中顯示模式一張地圖.這就像 leaflet
v0.7.7 的魅力一樣.查看此 Plunker:點(diǎn)擊--> 點(diǎn)擊縮放控件下方的按鈕.
I'm using leaflet
and modalcss to display a modal within a map.
This worked like a charm with leaflet
v0.7.7. See this Plunker: click
--> Click the button under the zoom controls.
當(dāng)我切換到 leaflet
v1.2.0 時(shí),模式會(huì)打開但在地圖后面.查看此 Plunker:點(diǎn)擊
When I switch to leaflet
v1.2.0 the modal gets opened but behind the map. See this Plunker: click
為什么會(huì)這樣?關(guān)于如何在舊版本的 leaflet
中顯示模式的任何想法?謝謝!
Why is this happening?
Any idea on how to show the modal in front of the map like in the old version of leaflet
?
Thanks!
推薦答案
將此 CSS 規(guī)則應(yīng)用于地圖和模型:
Apply this CSS rules to map and model:
#map{ z-index:1; }
#modal{ z-index:2; }
這篇關(guān)于傳單 - 模式在地圖后面打開的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!