0
您好我現在用的是下面的CSS刪除多餘的白色borderfrom它正常工作與在CSS 所提供的高度&寬度信息窗口,但我使用2個信息窗口&都去掉白邊在Infowidows的不同的高度&寬度,所以當我調整高度&寬度爲每1信息窗口的超白邊框顯示的另一個信息窗口無法從信息窗口
有什麼辦法,我可以同時從信息窗口中刪除白色邊框。我曾嘗試設置高度&寬度爲Auto但沒有成功
// --------------java script-----------------
var iwOuter1 = $('.gm-style-iw');
/*
* Since this div is in a position prior to .gm-div
* style-iw. We use jQuery and create a iwBackground
* variable, and took advantage of the existing reference
* .gm-style-iw for the previous div with .prev().
*/
var iwBackground1 = iwOuter1.prev();
// Removes background shadow DIV
iwBackground1.children(':nth-child(2)').css({
'display': 'none'
});
// Removes white background DIV
iwBackground1.children(':nth-child(4)').css({
'display': 'none'
});
// Changes the desired tail shadow color.
iwBackground1.children(':nth-child(3)').find('div').children().css({
'box-shadow': 'rgba(0, 0, 0, 0.9) 0px 1px 6px',
'z-index': '1'
});
// Reference to the div that groups the close button
// elements.
var iwCloseBtn1 = iwOuter1.next();
// Apply the desired effect to the close button
iwCloseBtn1.css({
opacity: '1',
right: '74px',
top: '25px'
});
// If the content of infowindow not exceed the set maximum
// height, then the gradient is removed.
if ($('.iw-content').height() < 140) {
$('.iw-bottom-gradient').css({
display: 'none'
});
}
// The API automatically applies 0.7 opacity to the button
// after the mouseout event. This function reverses this
// event to the desired value.
iwCloseBtn1.mouseout(function() {
$(this).css({
opacity: '1'
});
});
});
}
-------------------css-----------------
.gm-style-iw {
max-width:480px;
min-width:200px;
top: 15px !important;
left: 0px !important;
background-color: #fff;
box-shadow: 0 1px 6px rgba(178, 178, 178, 0.6);
border: 1px solid rgba(72, 181, 233, 0.6);
}
#iw-container {
margin-bottom: 10px;
}
#iw-container .iw-title {
font-family: 'Open Sans Condensed', sans-serif;
font-size: 22px;
font-weight: 400;
padding: 10px;
color: #3399ff;
text-align: left;
margin: 0;
background-color:#f6d9bb;
border-radius: 2px 2px 0 0;
border-bottom: 3px solid black;
height: 100%;
}
#iw-container .iw-title1 {
font-family: 'Open Sans Condensed', sans-serif;
font-size: 15px;
font-weight: 400;
padding: 10px;
color: black;
text-align: center;
margin: 10px;
border-radius: 2px 2px 0 0;
}
#iw-container .iw-content {
font-size: 13px;
line-height: 18px;
font-weight: 400;
margin-right: 1px;
padding: 15px 5px 20px 15px;
max-height: 140px;
overflow-y: auto;
overflow-x: hidden;
}
.iw-content img {
float: right;
margin: 0 5px 5px 10px;
}
你能提供jsfiddle或html部分嗎?這很難理解發生了什麼:) – moped