本文共 262 字,大约阅读时间需要 1 分钟。
import remarkIcon from './redflag.png';
L.icon 中使用 iconUrl 用 import 的图片
let icon = L.icon({ iconUrl: remarkIcon, iconSize: [16, 16]});
css 使用 url
.remark-icon { width: 16px; height: 16px; background: url('./redflag.png');}
转载地址:http://ganii.baihongyu.com/