如何使用 CSS className 去除 python 中破折号传单周围的气泡

How can I use CSS className to remove the bubble surrounding dash leaflet in python

我想叠加一个城市冲刺传单地图。我可以使用专用 class

dl.Map(id="map-id", style={'width': '1000px', 'height': '500px'},
   center= [29.66, -97.65] , zoom=4, children=[
        dl.CircleMarker(center=[29.666 , -97.6513], radius=3,color="red", 
                 fill=True,fillColor="red",fillOpacity=1,
                       children=[   dl.Tooltip("Ziedler Dam", permanent=True,
                                      className='my-perm-class')  ]),
        ])

这里我定义了一个CSS文件如下

.my-perm-class {
}
.leaflet-popup-tip-container.my-perm-class {
    display: none;
}
.leaflet-tooltip.my-perm-class {
padding: 0px;
box-shadow: none;
background-color: transparent;
border-left-color:transparent;
border-right-color:transparent;
border: none
}

然后我卡住了....剩下一个小三角形!!在 Chrome 我可以看到如果我禁用

.leaflet-tooltip-top:before, .leaflet-tooltip-bottom:before, .leaflet-tooltip-left:before, .leaflet-tooltip-right:before {
border: 6px solid transparent;
}

那就行了,但是命名空间的语法和“之前”的那个冒号让我感到困惑。这有写吗?

谢谢,

:before 语法创建一个 pseudo-element 作为所选元素的第一个子元素。要删除三角形,只需将以下行添加到 .css 文件,

.leaflet-tooltip-left.my-perm-class:before {
    border: none
}