P粉4038217402023-08-26 00:48:09
The bindPopup
method can be passed an "options"
parameter, which can contain the "className"
attribute that will be added to the div. For popups:
marker.on('mouseover', function() { marker.bindPopup('<b>Hello world</b>',{className: 'mouseover-popup'}); marker.openPopup(); }) marker.on('click', function() { marker.bindPopup('<b>Hello world</b>',{className: 'click-popup'}); marker.openPopup(); })