Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to make ie browser support html5

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to make the ie browser support html5 related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe that after reading this article on how to make the ie browser support html5 will have a harvest, let's take a look at it.

The code is as follows:

Mxria {color: red;}

Hello!

In order for the browser to recognize the tag and display the effect of the corresponding style, we can add a js as follows, and the effect will be different.

Copy the code

The code is as follows:

Mxria {color: red;}

Document.createElement ("mxria")

Hello!mxria.com

Now you understand the secret of it! Yes, it's document.createElement. HTML5 shiv is such a js plug-in that regenerates all HTML5 tags, you need to load the plug-in, and the HTML5 program can be recognized by all browsers.

Simple usage of trunk/html5.js:

The following is the html5.js file that references Google:

The use of html5shiv is very simple. Considering that IE9 supports html5, you only need to add the following code to the page head:

Copy the code

The code is as follows:

Copy the above code to the head section, and remember that it must be the head part (because IE must know the element before it is parsed, the js file cannot be called elsewhere, otherwise it will be invalidated)

Of course, you can also take out the code and do it for yourself:

(function () {if (! / * @ ccroomonically accurate roomproof raceme 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 (','), ifole.roomthatwhile (iMube -) {document.createElement (e [I])}}) ()

Finally, add this paragraph to the css:

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

The main thing is to make these html5 tags into blocks, like div.

This is the end of the article on "how to make ie browsers support html5". Thank you for reading! I believe you all have a certain understanding of "how to make ie browsers support html5". If you want to learn more, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report