IE not styling HTML5 tags (with shiv)

后端 未结 3 1565
有刺的猬
有刺的猬 2020-12-09 11:28

I\'m trying to style a

and it\'s not working in IE. I\'m using Modernizr, but i\'ve tried the shiv by itself.

Example code



        
3条回答
  •  臣服心动
    2020-12-09 11:51

    Sometimes custom elements (which is how we convince IE to use HTML5 tags) are inline by default. Try adding the following piece of CSS:

    section,
    header {
        display: block;
    }
    

提交回复
热议问题