有誰知道SVG是否在最新版本的IE中工作?SVG和Internet Explorer?
0
A
回答
3
你需要一個插件來獲得它在當前穩定版本的IE瀏覽器。但是,IE9在發佈時應該提供SVG支持(Microsoft blog post)。
0
即低於版本9不支持SVG組件,但IE 8和下方支撐VML而是使SVG在最近版本的IE瀏覽器的工作,你可以在你的HTML文件的頭部輸入以下代碼
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<!--[if IE]>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>
<style>
.chromeFrameInstallDefaultStyle {
position:fixed;
overflow:auto;
width: 800px; /* default is 800px */
height: 80%; /* default is 800px */
border: 5px solid blue;
right:100px;
bottom:100px;
z-index: 99999 !important;
}
</style>
<div id="prompt">
<!-- if IE without GCF, prompt goes here -->
</div>
<script>
// The conditional ensures that this code will only execute in IE,
// Therefore we can use the IE-specific attachEvent without worry
window.attachEvent("onload", function() {
CFInstall.check({
mode: "inline", // the default
node: "prompt"
});
});
</script>
<![endif]-->
這將要求用戶在IE上安裝谷歌框架。只需要幾分鐘。之後,所有html5組件以及SVG組件都可以使用。
0
http://caniuse.com/#search=svg
爲IE
<img src="image.svg" onerror="this.onerror=null; this.src='image.png'">
的Modernizr:
.main-header {
background: url(logo.svg) no-repeat top left;
background-size: contain;
}
.no-svg .main-header {
background-image: url(logo.png);
}
和其他解決方案:
<svg> ... </svg>
<div class="fallback"></div>
.logo-fallback {
display: none;
}
.no-svg .logo-fallback {
background-image: url(logo.png);
}
相關問題
- 1. 的Internet Explorer 8和Internet Explorer 6並排
- 2. cubism.js和Internet Explorer
- 3. JQuery和Internet Explorer
- 4. datepicker和Internet Explorer
- 5. Ajax和Internet Explorer
- 6. .htacess和Internet Explorer
- 7. Internet Explorer和IIS
- 8. CSS和Internet Explorer
- 9. HTML5和Internet Explorer?
- 10. SVG沒有在Internet Explorer上全寬
- 11. Internet Explorer中的D3 SVG問題
- 12. Internet Explorer 11 svg延伸的圖片
- 13. Internet Explorer和在IFRAME
- 14. GWT setWidth和Internet Explorer
- 15. JavaScript和Internet Explorer 8
- 16. Internet Explorer 9和XSLT
- 17. Internet Explorer BHO和SSL
- 18. JQuery MVC和Internet Explorer
- 19. Internet Explorer和緩存
- 20. Internet Explorer 8和CSS
- 21. Selenium RC和Internet Explorer
- 22. Prototype的Ajax.Request和Internet Explorer 8
- 23. jQuery的生活()和Internet Explorer
- 24. Django,Apache,Nginx和Internet Explorer
- 25. Internet Explorer和的onMouseOver /的onmouseout
- 26. WPF .net4 webBrowser和Internet Explorer 8
- 27. XHTML,Glassfish,Apache和Internet Explorer
- 28. extjs和Internet Explorer 8問題
- 29. VideoJS後備和Internet Explorer 8
- 30. z-index和Internet Explorer 9
有點像IE6如何支持CSS? :-) – Ken 2010-08-20 17:06:45
你知道這樣的插件可以在IE6,7,8的32位和64位版本中使用嗎? – 2011-03-09 08:00:50