流体布局在 Internet Explorer 7 和 8 中不起作用
Fluid layout not working in Internet Explorer 7 and 8
我正在使用CSS负责任地处理浮动框,我的目标是使其在Internet Explorer 7和8中工作。我可以在 Jquery 中实现这一点吗?
如果有人能提供帮助,那将是一个巨大的帮助!!
这是我的小提琴。 请更新:)
http://jsfiddle.net/ZuJW2/
/* =============================================================================
BOXS RESPONSIVE
========================================================================== */
#examples {
width: 100%;
max-width: 970px;
margin: 0 auto;
}
#examples ul {
width: 100%;
overflow: hidden;
*zoom: 1;
}
#examples ul li {
float: left;
margin-right: -100%;
width: 100%;
}
#examples ul li a:hover {
text-decoration: none;
}
#examples ul li span {
font-size: 16px;
line-height: 22px;
display: block;
padding-bottom: 30px;
}
#examples ul li img {
width: 100%;
}
#examples ul li:nth-child(1n+1) {
margin-left: 0%;
margin-bottom: 3.85%;
clear: both;
overflow: hidden;
*zoom: 1;
}
@media screen and (min-width: 460px) {
#examples ul li {
float: left;
margin-right: -100%;
width: 48.08%;
}
#examples ul li span {
padding-bottom: 10px;
}
#examples ul li:nth-child(2n+1) {
margin-left: 0%;
margin-bottom: 3.85%;
clear: both;
overflow: hidden;
*zoom: 1;
}
#examples ul li:nth-child(2n+2) {
margin-left: 51.93%;
margin-bottom: 3.85%;
clear: none;
}
}
@media screen and (min-width: 700px) {
#examples ul li span {
padding-bottom: 10px;
}
}
@media screen and (min-width: 900px) {
#examples ul li {
float: left;
margin-right: -100%;
width: 22.11%;
}
#examples ul li span {
padding-bottom: 0px;
}
#examples ul li:nth-child(4n+1) {
margin-left: 0%;
margin-bottom: 3.85%;
clear: both;
overflow: hidden;
*zoom: 1;
}
#examples ul li:nth-child(4n+2) {
margin-left: 25.96%;
margin-bottom: 3.85%;
clear: none;
}
#examples ul li:nth-child(4n+3) {
margin-left: 51.93%;
margin-bottom: 3.85%;
clear: none;
}
#examples ul li:nth-child(4n+4) {
margin-left: 77.89%;
margin-bottom: 3.85%;
clear: none;
}
}
使用 Modernizr 处理 IE7 和 8。
我使用Response JS。IE8 及更低版本不支持 CSS 媒体查询或最小/最大宽度,您需要使用填充代码才能正常工作。
您可以通过将以下代码添加到 <head>
标记,在 IE 8 及更低版本的文档中包含 RespondJS。
<!--[if lt IE 9]>
<script src="/PATH-TO-JS/respond.min.js"></script>
<![endif]-->
相关文章:
- 在Internet Explorer中,向所选内容添加选项不起作用
- 鼠标事件在 Internet Explorer 中不起作用
- 输入类型的图像在Internet Explorer中不起作用,但在Chrome和Firefox中起作用
- 包含jquery的Javascript在Internet Explorer中不起作用
- onClick和onClientClick事件一起使用.在Internet Explorer中不起作用
- Javascript图像动画在Firefox或Internet Explorer中不起作用
- 使用JS固定标题的表在Internet explorer中不起作用
- Angular $templateCache在 Internet Explorer 中不起作用
- 滑块图像在Internet Explorer中不起作用,但在其他浏览器中有效
- 带有 Internet Explorer 8/9 的 Editor Ace 不起作用
- Window.location 在 Internet Explorer 中不起作用
- Ajax POST 请求在 Internet Explorer 中不起作用
- 脚本在 Internet Explorer 中不起作用
- 在第二次加载时更改 iframe 样式,在 Internet Explorer 9 中不起作用
- 流体布局在 Internet Explorer 7 和 8 中不起作用
- blockUI 在 Internet Explorer 上不起作用
- Javascript在Internet Explorer上不起作用
- 屏幕键盘在 Internet Explorer 中不起作用
- jQuery 动画在 Internet Explorer 中不起作用
- 元标记中的JavaScript在Firefox和Internet Explorer上不起作用