j9九游会

  • <tr id='n6ptj7'><strong id='wcc3l'></strong> <small id='7zmrk'></small><button id='ii1sil'></button><li id='m9g9n'> <noscript id='nex4j'><big id='pn9e6'></big><dt id='9hea'></dt></noscript></li></tr> <ol id='7heq'><option id='xzk9z'><table id='qxr91'><blockquote id='5prw'> <tbody id='gjnj'></tbody></blockquote></table></option></ol><u id='54u1f7'></u><kbd id='z324'> <kbd id='w24fyi'></kbd></kbd>

    <code id='vpccv'><strong id='1v4tyl'></strong></code>

    <fieldset id='5eahn'></fieldset>
          <span id='r4qa5'></span>

              <ins id='jk8jr1'></ins>
              <acronym id='2ocjbl'><em id='6gl7yy'></em><td id='exngg'><div id='zuenm'></div></td></acronym><address id='0jj8h'><big id='n835z'><big id='p6976'></big><legend id='2suil'></legend></big></address>

              <i id='kthf2'><div id='cin9k'><ins id='nuc5r'></ins></div></i>
              <i id='8ncf3c'></i>
            1. <dl id='i39wq'></dl>
              1. <blockquote id='m4dp'><q id='qqqp'><noscript id='rfw6o'></noscript><dt id='9hu3'></dt></q></blockquote><noframes id='eocxwg'><i id='u9nz'></i>

                ie8支持html5吗

                2023-01-11 13:39 栏目: 技术学堂 查看()

                ie8不支持html5,若是想要ie8支持html5,有两种方式:1、引用google的html5.js文件,并将代码放到head标签区间;2、通过添加“while (i--){document.createElement(e[i])}”代码实现支持HTML5元素。

                2023010615271433829.jpg

                本教程操作环境:Windows10系统、HTML5版。

                ie8支持html5吗?

                不支持。

                但是让IE(ie6/ie7/ie8)支持HTML5元素,我们可以在HTML头部添加以下JavaScript,这是一个简单的document.createElement声明,利用条件注释针对IE来调用这个js文件。Opera,FireFox等其他非IE浏览器就会忽视这段代码,也不会存在http请求。

                  方式一:引用google的html5.js文件,代码内容可以自己下载下来看。

                1

                2

                3

                <!–[if lt IE9]>

                <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>

                <![endif]–>

                  将以上代码放到head标签区间

                  方式二:自己coding JS搞定。

                1

                2

                3

                4

                5

                6

                7

                8

                9

                10

                11

                12

                <script>

                   (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(', ');

                     var i= e.length;

                     while (i--){

                         document.createElement(e[i])

                     }

                })()

                </script>

                  不管你用上面哪中方式,请记得在CSS中进行如下定义,目的是让这些标签成为块状元素,just like div。

                1

                2

                /*html5*/

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

                本文来源:php中文网,如有侵权请联系j9九游会删除。

                扫二维码与商务沟通

                我们在微信上24小时期待你的声音

                解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流

                郑重申明:j9九游会科技以外的任何非授权单位或个人,不得使用我公司案例作为工作成功展示!