当前位置: 代码迷 >> Web前端 >> 各浏览器兼容步骤总汇
  详细解决方案

各浏览器兼容步骤总汇

热度:103   发布时间:2013-02-04 10:50:22.0
各浏览器兼容方法总汇

1:css-hack;

2:条件注释判断浏览器:

例如:

<script>

??//IE 6 会alert 2 次,其他浏览器只 alert 第一个
? alert('other');
</script>
<!--[if IE 6 ]>
<script type="text/javascript" defer="defer" async="true">
? alert('IE 6')
</script>
<![endif]-->

?

3:webkit,moz:

例如:

-webkit-border-radius:苹果;谷歌,等一些浏览器认,因为他们都用的是webkit内核;
-moz-border-radius:moz这个属性 主要是专门支持Mozilla Firefox 火狐浏览器的CSS属性。

  相关解决方案