谁能帮帮我,拜托。 如何在 ie9 上应用高度 css 属性,我是否可以在 css 文件中使用条件 css?
最佳答案
你不能在css文件中做有条件的css,但是你可以给每个版本的IE赋予它自己的类。只需将它放在 HTML 文件的顶部:
<!doctype html>
<!--[if !IE]> <html class="not-ie" lang="en"> <![endif]-->
<!--[if lt IE 7]> <html class="ie6" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="ie7" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="ie8" lang="en"> <![endif]-->
<!--[if IE 9]> <html class="ie9"><![endif]-->
<!--[if gt IE 9]><!--> <html lang="en"> <!--<![endif]-->
现在您需要在您的 css 文件中为 ie9 做的是:
.ie9 div.whatever {
height: some value;
}
关于css - 如何在 ie9 上应用高度 css 属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22365089/