在较小的屏幕(电话)上,传单弹出窗口倾向于使屏幕溢出。我想编写一些限制在最小宽度和最大宽度媒体查询内的css规则,以使弹出窗口仅适用于小型设备的全屏显示。
图书馆需要完成大量的定位工作,我很难超越这些规则。
@media (min-width: 1px) and (max-width: 500px) {
.leaflet-popup-content-wrapper {
position: relative;
}
.leaflet-popup-content {
position: fixed; //Tried absolute, too
top: 0;
bottom:0;
right:0;
}
}
Run Code Online (Sandbox Code Playgroud)