Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.5k views
in Technique[技术] by (71.8m points)

img标签引用网络资源svg文件不显示的问题如何解决?

img标签内src属性引用一个本地的svg文件能正常显示,如:
<img src="./img/a.svg" />
但是当引用一个网络svg资源的时候,就无法显示,如:
<img src="http://192.168.1.168:8080/img?id=1" />


该问题如何解决?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

看下你的这个网络资源地址返回的 content-type 是不是正确的.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...