kno*_*tty 10 html5 internet-explorer web-component html5-template
我在HTML5中制作了一个模板,该模板与Chrome和Firefox一起使用,但没有使用Internet Explorer(在IE 8上测试过).
我怎么解决这个问题?
我推荐你Neovov的polyfill:https: //github.com/neovov/template-element-polyfill
注意:IE 11中存在一个错误:它在呈现DOM之前在<body>元素下移动<template>!所以parentNode属性是错误的,嵌套将失败.您可以在[F12]工具中看到它.
小智 5
只需在模板中添加“ display:none”即可。适用于ie 11
<template id="fancyTemplate" style="display:none"></template>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
14550 次 |
最近记录: |