【问题标题】:How to change the hyperlink color in a leaflet popup?如何更改传单弹出窗口中的超链接颜色?
【发布时间】:2021-02-23 17:11:39
【问题描述】:

我定义了一个样式:

.custom-popup .leaflet-popup-content {
max:Height: 500px;
...
}

我想更改弹出窗口中超链接的默认颜色(蓝色)并且在弹出窗口中。

如何替换默认颜色?
提前谢谢你

注意 1:我发现了这个:

.custom-popup .leaflet-popup-content a {
color:red;
}

但是文字和下划线是红色的!我想要红色的文字和白色的下划线

注2:根据@Falke设计

.custom-popup .leaflet-popup-content a {
color:red;
text-decoration: none;
}
.custom-popup .leaflet-popup-content a:hover {
color:red;
text-decoration: none;
border-bottom: 1px solid white;
}

文字为红色,无下划线OK
鼠标悬停:文字为红色,红色下划线,白色下划线!!!???为什么要加双下划线?

【问题讨论】:

标签: html hyperlink leaflet


【解决方案1】:

您可以为文本添加底部边框。

.custom-popup .leaflet-popup-content a {
    color:red;
    text-decoration:none;
    border-bottom: 1px solid #fff;
}

【讨论】:

  • 为什么要加双下划线?
  • text-decoration:none; 应该只有一个下划线可见
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-05-02
  • 1970-01-01
  • 2016-01-01
  • 1970-01-01
  • 2021-06-24
  • 2017-02-21
相关资源
最近更新 更多