CSS3的浏览器兼容性问题 [英] Browser compatibility issues with CSS3

查看:132
本文介绍了CSS3的浏览器兼容性问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用一些CSS3设计了几个网页。它在Google Chrome中看起来不错,但在Internet Explorer中样式变得笨拙。我有两个问题关于这些:

I designed a few web pages using some CSS3. It looks good in Google Chrome, but the styles become clumsy in Internet Explorer. I have two questions regarding these:

我可以这样做:我可以做两个样式表,的用户加载适当的版本。让我更清楚一点:

Can I do something like this : I can make two style sheets and depending the browser of the user load the appropriate version. Let me make it more clear:

if browser is Internet Explorer
    use stylesheet1.css
else
    use stylesheet2.css






我的主要问题是与 border-radius 属性的用法。

推荐答案

在HTML /标头中执行以下操作:

In your HTML/header do the following:

<!--[if IE]>
 <link rel = "stylesheet" type = "text/css" href = "ie-css.css" />
<![endif]-->

您还可以进一步细分:

<!--[if IE 7 ]>     
 <link rel = "stylesheet" type = "text/css" href = "ie7-css.css" />
<![endif]-->

或许多其他组合:

<!--[if IE 7 ]>
<!--[if lt IE 7]>     <--- less than IE7
<!--[if gt IE 7]>     <--- greater than IE7
<!--[if IE 8 ]>
<!--[if IE 9 ]>
<!--[if !IE]> 

HTML5 Boilerplate

<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->

这篇关于CSS3的浏览器兼容性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆