google chrome - SVG won't display -
i'm trying simple code work:
<a href="#" target="_blank" style="display: inline-block;"> <object data="icons/chrome.svg" type="image/svg+xml" style="pointer-events: none;"> fallback text </object> </a>
when use
data="http://images3.wikia.nocookie.net/__cb20120330024139/logopedia/images/d/d7/google_chrome_logo_2011.svg"
it works. when save exact file onto own server , reference above, shows fallback text in firefox. in chrome downloads file when open page (which proves file link correct).
anyone know what's going on here?
i can think of 4 possibilities:
your server using wrong mime type svg images. (can fixed adding
addtype image/svg+xml svg
.htaccess file; other methods discussed here)you saved svg file somewhere else , doesn't exist @
icons/chrome.svg
. (try navigating straight svg file @ icons/chrome.svg. display in browser?)you saved file insufficient permissions, resulting in web server being unable access file. (can fixed navigating
icons
directory , typingchmod 0644 chrome.svg
@ command line prompt.)the file downloaded nocookie.net isn't svg file @ all. (try opening inside text editor.)
Comments
Post a Comment