【发布时间】:2014-09-30 17:15:41
【问题描述】:
你好朋友请帮助我,我已经使用了各种方式,但响应式设计在 IE 中不起作用。我已经使用了一切。我也使用过 css-mediaqueries.js。没用,请帮帮我
这里我给你我的示例 html 页面:
<!DOCTYPE html>
<!--[if IE 7 ]><html class="ie7" lang="en"><![endif]-->
<!--[if IE 8 ]><html class="ie8" lang="en"><![endif]-->
<!--[if IE 9 ]><html class="ie9" lang="en"><![endif]-->
<!--[if !IE]><!--> <html> <!--<![endif]-->
<head>
<!-- Meta -->
<meta charset="utf-8">
<meta name="keywords" content="" />
<meta name="description" content="">
<meta name="author" content="">
<title>Ads View Page</title>
<!-- Mobile Meta -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<![endif]-->
<!-- css -->
<link rel="stylesheet" href="inc-media/bsm_style.css">
<link rel="stylesheet" href="inc-media/responsive.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!--[if lt IE 9]>
<script src="inc-media/html5shiv.js"></script>
<script src="inc-media/respond.js"></script>
<![endif]-->
</head>
<body>
<header></header>
</body>
</html>
这是我的响应式和主要 Css 响应式 CSS
@charset "utf-8";
/* CSS Document */
@media screen and (min-width: 768px) and (max-width: 979px) {
header{ background:#FF0000!important;
}
}
@media screen and (max-width: 767px) {
header{ background:#069!important;}
}
@media screen and (max-width: 480px) {
header{ background:#36F!important;}
}
主CSS
/* Reset Styling
----------------------------------------------------------------------*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, img {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
* {
outline: none;
padding: 0px;
margin: 0px
}
body{
background:#999;}
header{ width:100%; background:#fff; height:150px; border-bottom:1px soild #333; margin:0px; padding:0px;}
**
请告诉我的朋友们我之间缺少什么。
【问题讨论】:
-
你确定respond.js的路径是正确的吗?您是在本地测试还是在现场测试?有些脚本可能无法在本地运行,但它们可以在实时站点上运行。
-
我已经检查了 respond.js 它是正确的..因为即使我已经再次下载了它......而且我还在线检查了该脚本......仍然无法正常工作..
-
respond.js 不支持所有类型的媒体查询,我会检查第一个是否是问题。双“和”逻辑可能超出插件的支持范围。
标签: html css internet-explorer responsive-design media-queries