[英]SVG and Javascript not working 'online' in Chrome
I have been creating a map of a local town center and it has taken ages, I wanted it to be in SVG so I could zoom in and out and also have 'popup' details when the cursor moves over an element. 我一直在创建本地城镇中心的地图,并且已经用了很多年了,我希望它可以在SVG中使用,这样我可以放大和缩小,并且当光标移到某个元素上时也具有“弹出”详细信息。 This is done in Javascript (I am a beginner!!).
这是用Javascript完成的(我是初学者!)。
I have searched here and online and cobbled together something good BUT it doesn't work if I put it into a 'window' as seen here 我在这里搜索并在线搜索并拼凑出一些不错的东西,但是如果我将其放入“窗口”,则无法正常工作,如此处所示
http://www.poipleshadow.com/Goa-Mapusa-Market . http://www.poipleshadow.com/Goa-Mapusa-Market 。
(scrolling and zooming breaks and the text becomes tiny!) (滚动和缩放中断,并且文本变得很小!)
I am hoping there is a Javascript/SVG god somewhere out there who can help 我希望有一个Javascript / SVG上帝可以帮助您
The same image works here on its own 同一张图片在这里可以单独使用
http://www.poipleshadow.com/Images/Mapusa-Market.svg http://www.poipleshadow.com/Images/Mapusa-Market.svg
Thanks to Eric, The reason that the SVG behaved differently was because it was in an image tag 感谢Eric,SVG的行为有所不同的原因是因为它在图像标签中
DIDN'T WORK 不工作
<img src="Images/Mapusa-Market.svg" alt="Mapusa Market" width="900" height="300" />
DOES WORK 工作吗
<object type="image/svg+xml" data="Images/Mapusa-Market.svg"></object>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.