HTML5 Shiv – 让IE系列支持HTML5

将上代码复制到head部分,记住一定要是head部分(因为IE必须在元素解析前知道这个元素,所以这个js文件不能在其他位置调用,否则失效)

当然,你也可以把代码拿出来自己看着办:

(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])}})()

最后在css里面加上这段:

/*html5*/
article,aside,dialog,footer,header,section,footer,nav,figure,menu{display:block}

主要是让这些html5标签成块状,像div那样。

好了,简单吧,一句话概括就是:引用html5.js  使html5标签成块状


Fatal error: Uncaught Error: Call to undefined function create_function() in /www/wwwroot/www.menglei.net/wp-content/plugins/autoptimize/classes/autoptimizeStyles.php:96 Stack trace: #0 /www/wwwroot/www.menglei.net/wp-content/plugins/autoptimize/autoptimize.php(293): autoptimizeStyles->read() #1 [internal function]: autoptimize_end_buffering() #2 /www/wwwroot/www.menglei.net/wp-includes/functions.php(5349): ob_end_flush() #3 /www/wwwroot/www.menglei.net/wp-includes/class-wp-hook.php(310): wp_ob_end_flush_all() #4 /www/wwwroot/www.menglei.net/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters() #5 /www/wwwroot/www.menglei.net/wp-includes/plugin.php(517): WP_Hook->do_action() #6 /www/wwwroot/www.menglei.net/wp-includes/load.php(1252): do_action() #7 [internal function]: shutdown_action_hook() #8 {main} thrown in /www/wwwroot/www.menglei.net/wp-content/plugins/autoptimize/classes/autoptimizeStyles.php on line 96