本文介绍了CSS3媒体查询无法在IE10以下的IE中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经创建了一个响应式电子邮件模板,并且问题是媒体查询在IE10浏览器下无法正常工作.我已经使用js库使其运行了,但是却无法正常工作.
I have created a responsive email template and the problem is media queries are not working in below IE10 browser. I have used js library to make it run but it is not working.
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
@media screen and (max-width: 600px) {
/*widths for standard blocks*/
table[class=w15], td[class=w15], img[class=w15] {width:15px !important;}
table[class=w170], td[class=w170], img[class=w170] {width:290px !important;}
table[class=w180], td[class=w180], img[class=w180] {width:145px !important;}
table[class=w200], td[class=w200], img[class=w200] {width:320px !important;}
}
</style>
<!--[if lt IE 9]>
<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->
</head>
网络链接网址:
http://silista.in/praveen/template-1.html
Web link url:
http://silista.in/praveen/template-1.html
推荐答案
针对IE的最佳媒体查询技巧将是
Best media query hacks for IE would be
IE10 @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {}
IE8 @media \0screen {}
IE7 @media screen\9 {}
您可以在上述任何媒体查询中添加IE特定的CSS代码.
You can add your IE specific CSS code within any of the media queries above.
在此处了解更多信息: http://browserhacks.com/
Read more here: http://browserhacks.com/
这篇关于CSS3媒体查询无法在IE10以下的IE中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!