如何更改 Mapbox GL JS 中的光标图像?我努力了
#map-container {
cursor: crosshair;
}
but it doesn't work.
Run Code Online (Sandbox Code Playgroud)
#map-container canvas {
cursor: crosshair;
}
where #map-container is the id of the element where your mapbox Gl JS is located.
Run Code Online (Sandbox Code Playgroud)
或以编程方式
map.getCanvas().style.cursor = 'crosshair'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1330 次 |
| 最近记录: |