我正在使用以下在 IE7 中不起作用的内容。
<!-- styles to use for small screens, such as phones -->
<link rel="stylesheet" media="screen and (max-width:480px)" href="phone.css">
<!-- styles to use for medium screens, such as tablets -->
<link rel="stylesheet" media="screen and (min-width:481px) and (max-width:800px)" href="tablet.css">
<!-- styles to use for larger screens, such as desktops and laptops -->
<link rel="stylesheet" media="screen and (min-width:801px)" href="styles.css">
我想知道为什么这在IE7中不起作用?有没有办法在一个样式表中完成这一切......这将在 IE 中工作?
谢谢
我最终这样做了,以便将 IE8(及以下)直接驱动到我的标准样式表:
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="styles.css" />
<![endif]-->
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="styles.css" />
<![endif]-->
<!-- styles to use for small screens, such as phones -->
<link rel="stylesheet" media="screen and (max-width:480px)" href="phone.css">
<!-- styles to use for medium screens, such as tablets -->
<link rel="stylesheet" media="screen and (min-width:481px) and (max-width:800px)" href="tablet.css">
<!-- styles to use for larger screens, such as desktops and laptops -->
<link rel="stylesheet" media="screen and (min-width:801px)" href="styles.css">