我在leaflet.css中关闭了“图层控制”的背景,但黑色的框架仍然存在。如何在css中禁用它?我将非常感谢你的回答。我添加了参数: outline: none;box-shadow: none;border: none,但它们在这里不起作用。
/* layers control */
.leaflet-control-layers {
box-shadow: 0 0px 0px rgba(0,0,0,0.0);
background: solid rgba(0,0,0,0.0);
border-radius: 4px;
}
.leaflet-control-layers-toggle {
background-image: url("../../images/text/0_Filter.png");
width: 106px;
height: 22px;
}
.leaflet-retina .leaflet-control-layers-toggle {
background-image: url("../../images/text/0_Filter.png");
background-size: 106px 22px;
}
.leaflet-touch .leaflet-control-layers-toggle {
width: 106px;
height: 22px;
outline: none; /* test dont work*/
box-shadow: none; /* test dont work*/
border: none /* test dont work*/
}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
display: none;
}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
display: block;
position: relative;
}
.leaflet-control-layers-expanded {
padding: 6px 10px 6px 6px;
color: #333;
background: #fff;
}
.leaflet-control-layers-scrollbar {
overflow-y: scroll;
overflow-x: hidden;
padding-right: 5px;
}
.leaflet-control-layers-selector {
margin-top: 2px;
position: relative;
top: 1px;
}
.leaflet-control-layers label {
display: block;
}
.leaflet-control-layers-separator {
height: 0;
border-top: 1px solid #ddd;
margin: 5px -10px 5px -6px;
}发布于 2019-10-07 02:55:58
根据live site的说法,在<a>标签的包装器中有一个边界。
您需要移除该边框,如下所示:
.leaflet-touch .leaflet-control-layers {
border: none;
}https://stackoverflow.com/questions/58258575
复制相似问题