flex布局在IE10上不支持,为IE10编写特定的样式可以用判断navigator.userAgent 的方法
var doc = document.documentElement; doc.setAttribute('data-useragent', navigator.userAgent);
css:
html[data-useragent*='MSIE 10.0'] .LoginContainer {
350px;
}
html[data-useragent*='MSIE 9.0'] .LoginContainer {
300px;
position: absolute;
left: 50%;
margin-left: -200px;
top: 50%;
margin-top: -200px;
}
IE用户代理字符
IE10 Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)