在全屏模式下嵌入必应地图 [英] Embed Bing map in fullscreen

查看:101
本文介绍了在全屏模式下嵌入必应地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

anuyone知道是否可以在全屏模式中嵌入bing地图吗?
这样地图就可以始终填充背景,并在顶部简单地覆盖一些元素.

Does anuyone know if it is possible to embed a bing map in fullscreen??
So that the map can always fill the background and simply overlay a few elements on top.

使用100%iframe似乎无法实现这一目标,而bing的帮助并没有太大帮助.

I cannot seem to achieve that with 100% iframe and bing's help is not that helpful.

谢谢

推荐答案

如果我对您的理解是正确的,那么您希望获得将地图填满整个屏幕的效果,有点像以地图为背景,并且然后其他元素叠加在上面吗?如果是这样,您应该可以通过以下位置轻松完成此任务:fixed CSS属性

If I understand you correctly, you want to achieve the effect of having the map fill up the entire screen, sort of like using the map as a background, and then have other elements overlaid on top? If so, you should be able to accomplish this easily via the position:fixed CSS Property.

        <div id='yourMapDiv' style="position: fixed; top: 0px;
            left: 0px; right:0px; bottom:0px; z-index: 100">
        </div>

这就是说yourMapDiv将具有一个固定位置,该位置与屏幕的所有四个边缘相距0像素.实际上,您可以在整个浏览器屏幕上显示yourMapDiv,而不必指定明确的长度或宽度,并且重新调整大小不会导致滚动条出现:

This is saying yourMapDiv will have a fixed position that is 0 pixel away from all four edges of the screen. In effect, you are spanning yourMapDiv across the entire browser screen, without having to specify explicit length or width, and re-sizing will not causing scroll bars to appear:

这是在Chrome中全屏显示的样子:

Here is what going full screen in Chrome looks like:

在上面的示例中,我为yourMapDiv分配了100的z索引,以说明如果希望其他元素显示在地图上方,则必须为其分配较高的z索引.

In the example above I assigned a z-index of 100 to yourMapDiv, to illustrate that if you want other elements to appear above the map, you will have to assign a higher z-index to them.

这篇关于在全屏模式下嵌入必应地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆