2

私はブートストラップ twitter の新機能です。私のバージョンは 2.3.2 です。Google マップをサイトに含めた後、Google マップ コントロールが非表示になりました。この問題を検索しましたが、すべてが機能しませんでした。このコードはレイアウトを修正しましたコントロールの数ですが、まだ触れられません

#map-canvas img { max-width: none ; max-height:none; }
#map-canvas label { width: auto; display: inline; }

また、ドロップダウンメニューの右側が変形しています

<div class="span9">
 <div id="map-canvas"></div>
</div>

ここに画像の説明を入力

4

1 に答える 1

3

ブートストラップ ドキュメントから ( http://getbootstrap.com/getting-started/#third-parties ):

ブートストラップされたプロジェクトで Google マップを使用している場合、* { box-sizing: border-box; }。以前は、画像で max-width を使用すると問題が発生した可能性もあります。次のスニペットは、これらの問題をすべて回避するはずです。

 /* Fix Google Maps canvas
 *
 * Wrap your Google Maps embed in a `.google-map-canvas` to reset Bootstrap's
 * global `box-sizing` changes. You may optionally need to reset the `max-width`
 * on images in case you've applied that anywhere else. (That shouldn't be as
 * necessary with Bootstrap 3 though as that behavior is relegated to the
 * `.img-responsive` class.)
 */

.google-map-canvas,
.google-map-canvas * { .box-sizing(content-box); }

/* Optional responsive image override */
img { max-width: none; }
于 2013-09-27T10:23:37.943 に答える