MapBox 属性溢出到地图的一侧

MapBox attribution is spilling off to the side of the map

如何重新定位 mapbox 属性文本?我有这个:

const map = new mapboxgl.Map({
  accessToken: '...',
  container: 'map',
  center: [16.572149246748594, 19.06111670348622],
  zoom: 1.5,
  style: 'mapbox://styles/my/map',
  attributionControl: false,
})
.addControl(new mapboxgl.AttributionControl({
  compact: true
}), 'top-left')

但它没有任何作用,它就在地图的左下角外面。我该如何解决这个问题?

我使用的是他们的 NPM 包,而不是 <script> 版本,如果有区别的话。

您可能必须包括

import 'mapbox-gl/dist/mapbox-gl.css';

那是我忘了做的。