Home > Web Front-end > H5 Tutorial > body text

HTML5—browser support issues

黄舟
Release: 2017-02-27 16:03:11
Original
1569 people have browsed it

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; 
}
Copy after login

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]-->
Copy after login

or directly introduce local js file

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


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>
Copy after login


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




Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template