Making an svg image object clickable with onclick, avoiding absolute positioning

前端 未结 13 1124
轻奢々
轻奢々 2020-12-02 13:54

I have tried to change the images on my site from img to svg, changing img tags to embed and object tags. Bu

13条回答
  •  -上瘾入骨i
    2020-12-02 14:33

    It worked by simply replacing the tag with and deleting the type attribute.

    For instance, in my code, instead of:

     
    

    which does not answer the clicking, I wrote:

     
    

    It works in Internet Explorer and Google Chrome, and I hope that in the other browsers too.

提交回复
热议问题