Display an .ico within an image element

2019-02-11 18:11发布

问题:

I'm trying to display an .ico within an image element <img> but in Internet Explorer it does not work/show. This is my code:

<img src="images.ico" >

Does anybody how to make it show up in all browsers?

回答1:

Displaying an ico file in an img tag is not guarenteed to work in all browsers(and i wouldn't recommend it). Convert the ico files to another format if you want to display them on the web.