最新兼容问题总结

兼容问题解决方案。

1、在做网站之前,先把下边三句meta加入页面。

<meta http-equiv="x-ua-compatible" content="IE=9" >

<meta http-equiv="x-ua-compatible" content="IE=8" >

<meta http-equiv="x-ua-compatible" content="IE=7" >

2、PC端兼容浏览器不能用html5新增的标签。

3、伪元素也不能用,在移动端可以用。

4、如果想针对某一个浏览器,设置单独的属性值,可以:

:   .class{

      Width:100px;

}

 /*针对IE6特制识别的CSS样式*/

*HTML .class

{样式}

 /*针对IE7特制识别的CSS样式*/

*+HTML .class

{样式}

 /*针对IE8特制识别的CSS样式*/

{样式9}

如:.class{

100px9;

}

/*针对IE9特制识别的CSS样式*/

:root .class

{样式}

@media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0) {Oprea}

@media screen and (-webkit-min-device-pixel-ratio:0) {谷歌}

@-moz-document url-prefix() {火狐}

原文地址:https://www.cnblogs.com/fkcqwq/p/6625326.html