Support HTML5 for IE6 7 and 8

Source: Internet
Author: User

In the old browsers, many elements are not supported, even if parsed, they are inline labels.

So a foreign guy writes JavaScript to replace some labels in the text with block labels, which solves many historical issues of IE.


How to use it?

Introduce html5shiv. js into the head


View sourceprint? 01 <! Doctype html>

02

03

04 <meta charset = "UTF-8">

05 <title> </title>

06 <script type = "text/javascript" src = "js/html5shiv. js"> </script>

07 <style type = "text/css">

08 nav {

09 width: 200px;

10 height: 100px;

11 background: # f12;

12}

13 </style>

14

15 <body>

16 <nav> 11111111111 </nav> 22222222

17 </body>

18


Open View in IE8 and you will find the HTML5 element tag nav, which can be used and displayed normally. This is why powerful tools are reprinted ~ I hope you will like it.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.