为echarts组件设置背景图,背景图不显示,排查方案 NowShimmer 2024-06-27 158 阅读1分钟 <style scoped> .chart { position: absolute; width: 100%; height: 100%; /* 图片居中 */ background-image: url("/static/china_map1.png"); background-size: 100% 100%; } </style> 如上在style标签里设置echarts背景图 1.检查图片路径 2.反斜杠检查 3.清除浏览器缓存 4.重启项目