我打算做一個應用程序,它有一個特殊的部分來顯示嵌入式谷歌地圖。 起初一切運作良好但是,當我旋轉回我的設備,地圖超出了定義的寬度,並失去了它的CSS類(它不能應用我使用的220px的寬度)。旋轉嵌入在HTML中的谷歌地圖
{//不管怎樣,我觸摸地圖將是確定,它關係到其寬度//} {//我使用Twitter的引導//}
,這是什麼大問題的解決方案我的?
我在等待你的回覆。
這是嵌入式谷歌地圖:
<article class="container">
.
.
.
...(some tags go here)
<section class="span12">
<div class="map">
<iframe width="80%" height="50%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/?ie=UTF8&ll=39.6846,-104.88802&spn=0.088114,0.209255&t=m&z=13&output=embed">
</iframe>
</div>
</section>
</article>
這是我使用一個CSS類:
@media (max-width: 400px) {
.map {width: 220px;}
}
你必須做出一個事件處理程序旋轉你的設備,並調用地圖調整從谷歌地圖API – 2012-08-15 12:14:05
我對我的作品功能,220px寬度應用。嘗試調整窗口的大小。 http://jsfiddle.net/Qv86D/ – LeBen 2012-08-15 13:42:18
非常感謝你們兩位 – Arash 2012-08-17 17:13:16