这里有一个简单的问题:我的传单 map 弹出窗口上的间距似乎卡在双倍间距中。我试图让每条新行都像这样显示:
Name: xxx
Date: xxx
而不是现在的样子:
Name: xxx
Date: xxx
这是我的脚本:
function createPopup(properties, attribute, layer, radius){
//add city to popup content string
var popupContent = '<h3>' + "Name: " + properties.info_firstName + " " + properties.info_lastName + '</h3>';
//add formatted attribute to panel content
popupContent += "<p><b>Number of Installs:</b> " + properties.GE_Count + "</p>" + "<p><b>Number of Installs:</b> " + properties.GE_Count + "</p>";
//replace the layer popup
layer.bindPopup(popupContent, {
offset: new L.Point(0,-radius)
});
};
还有我的 CSS:
.leaflet-popup-content-wrapper {
background-color: #e5e5e5;
opacity: .8;
}
.leaflet-popup-tip {
background-color: #e5e5e5;
opacity: .8;
}
.leaflet-popup-content p, h3{
color: #191900;
text-align: left;
font-family: 'Roboto Slab';
font-size: 12px
}
提前致谢!
最佳答案
您是否尝试过添加
h3 {
margin-top: 0;
margin-bottom: 0;
}
到你的CSS?
关于javascript - 更改传单弹出窗口中的行距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38981934/