最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Leaflet - modal opens behind map - Stack Overflow

programmeradmin1浏览0评论

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.

When I switch to leaflet v1.2.0 the modal gets opened but behind the map. See this Plunker: click

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!

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.

When I switch to leaflet v1.2.0 the modal gets opened but behind the map. See this Plunker: click

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!

Share Improve this question edited Oct 9, 2017 at 12:12 duenni asked Oct 9, 2017 at 12:04 duenniduenni 3181 gold badge4 silver badges22 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

Apply this CSS rules to map and model:

#map{ z-index:1; }
#modal{ z-index:2; }
发布评论

评论列表(0)

  1. 暂无评论