HTML5 兼容IE浏览器
2019獨角獸企業重金招聘Python工程師標準>>>
Java代碼 ?
<!doctype?html>??
<html>??
<head>??
<meta?charset="utf-8">??
<title></title>??
<!--[if?IE]>??
<script?type="text/javascript">??
(function(){if(!/*@cc_on!@*/0)return;var?e?="abbr,article,aside,audio,canvas,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video".split(','),i=e.length;while(i--){document.createElement(e[i])}})();??
</script>??
<![endif]-->??
</head>??
<style?type="text/css">??
header,nav,aside,article,footer{?display:block;}??
</style>??
<body>??
<header>??
????<p?class="f_r"><a>手機訪問</a>|<a>網站地圖</a>|<a>來院路線</a>|<a>收藏本站</a></p>??
</header>??
<nav>??
????<ul>??
????????<li>導航一</li>??
????????<li>導航二</li>??
????????<li>導航三</li>??
????</ul>??
</nav>??
<article>內容</article>??
<aside>??
????柵欄??
</aside>??
<footer>??
????<p>備案信息</p>??
</footer>??
</body>??
</html>??
?
其中的代碼如下,通過JS創建HTML5標簽下載地址?
Java代碼 ?
<!--[if?IE]>??
<script?type="text/javascript">??
(function(){if(!/*@cc_on!@*/0)return;var?e?="abbr,article,aside,audio,canvas,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video".split(','),i=e.length;while(i--){document.createElement(e[i])}})();??
</script>??
<![endif]-->??
?
其中的代碼如下,這些標簽本身就是塊級標簽,所以把這些標簽轉成塊級標簽
Java代碼 ?
header,nav,aside,article,footer{?display:block;}??
?
效果圖:
?
?
轉載于:https://my.oschina.net/u/2540857/blog/538009
總結
以上是生活随笔為你收集整理的HTML5 兼容IE浏览器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MySql 常见错误代码大全
- 下一篇: [数分提高]2014-2015-2第7教