Home  >  Article  >  Web Front-end  >  HTML5—browser support issues

HTML5—browser support issues

黄舟
黄舟Original
2017-02-27 16:03:111512browse

Latest versions of Safari, Chrome, Firefox, and Opera support certain HTML5 features. Internet Explorer 9 will support certain HTML5 features.

In order to allow older versions of browsers to display these elements correctly, you can set the display property value of CSS to block:


##

header, section, footer, aside, nav, main, article, figure {
    display: block; 
}

For ie browser, in order to make browsers below ie9 compatible with html5 elements , you can use shiv solution:

<!--[if lt IE 9]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

or directly introduce local js file

<!--[if lt IE 9]>
  <script src="html5shiv.min.js"></script>
<![endif]-->


html5shiv.js reference code must be placed in

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>渲染 HTML5</title>
  <!--[if lt IE 9]>
  <script src="html5shiv.min.js"></script>
  <![endif]-->
</head>


The above is the content of HTML5-browser support issues. For more related content, please pay attention to PHP Chinese Net (www.php.cn)!




Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn