CSS
flex使用
问题:在IE10下,flex无法直接使用
解决:加入-ms-前缀
便捷使用:https://blog.csdn.net/mazhili1991/article/details/104476445/
inline-block使用
问题:不同浏览器上使用inline-block,有些浏览器会在底部多几像素,不利于高度的设置
解决:在容器外一层添加font-size: 0;
JS
axios使用
问题:axios内部使用了Promise,IE10对Promise不支持
解决:在axios使用之前引入es6-promise解决
import Promise from 'es6-promise';
append使用
问题:IE10下无法使用append
解决:可以采用字符串拼接去进行组装html串,然后再用innerHtml塞入
点击事件taregt使用
问题:IE10下,e.target无法直接使用
解决:加入兼容性写法
const e = e || window.event
const target = e.target || e.srcElement
dataset使用
问题:IE10下,target.dataset不能使用
解决:使用target.getAttribute代替