`
keimon
  • 浏览: 72852 次
  • 性别: Icon_minigender_2
  • 来自: 上海
社区版块
存档分类
最新评论

各浏览器兼容方法总汇

 
阅读更多

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属性。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics