![](/img/trans.png)
[英]How to join a google map div with a contact form through bootstrap grid
[英]Google map div area covering contact form
我正在嘗試在Google地圖上放置表格。 該地圖正確顯示,但覆蓋了表單。 這是小提琴 。 它是整齊的形式,里面沒有任何東西。
.map-wrapper {
position:relative;
height:500px;
z-index:0;
}
.map-canvas {
background-color:#00FFFF; /*FOR TRIAL ONLY*/
width:100%;
z-index:2;
color: #29383F;
position:absolute;
height:100%;
left:0;
top:0;
right:0;
clear:both;
}
#ff {z-index:50000;} /*not originally part of my code but tried anyway. failed */
#ff input.short{display:block;width:50%;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;color:#000; border:1px solid #AFAFAF;padding:12px;margin: 5px 0 10px 0;font-size: 16px;max-height: 45px;}
#ff .sendButton {cursor:pointer;background-color: transparent;width:15%;color:#333;border: 3px solid #333;color: #333;font-size: 20px;padding: 8px 0 10px;}
和我的HTML只是:
<div class="map-wrapper">
<div class="map-canvas" id="map-canvas">Loading map...</div>
<form id="ff" name="ff" action="#" class="contact-form" method="post" accept-charset="utf-8">
<input type="text" name="from" id="from" class="short" placeholder="Your Name" required="required" autofocus="autofocus" value="" /><br/><br/>
<input type="email" name="fromemail" id="fromemail" class="short" placeholder="Your Email" required="required" value="" /><br/><br/>
<input class="sendButton send-mailbtn" type="submit" name="submit" id="submit" value="Submit"><br/><br/>
</form>
</div>
我在畫布上嘗試了不透明度,但是正如預期的那樣,它會影響地圖的可見性。
有什么線索嗎?
您可以嘗試設置表單樣式嗎?
form {
z-index: 3;
position: absolute;
left: 0;
right: 0;
top: 0;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.