CSS均匀地分布图像行,这将在IE8中起作用
我想知道是否有人能解决这个问题。我想要一个6列2行的图像网格。目前情况良好: 我用的是:CSS均匀地分布图像行,这将在IE8中起作用,css,internet-explorer-8,grid,Css,Internet Explorer 8,Grid,我想知道是否有人能解决这个问题。我想要一个6列2行的图像网格。目前情况良好: 我用的是: .gallery { list-style-type: none; } .gallery li { float: left; height: 130px; width: 130px; margin-bottom: 26px; margin-right: 26px; } .gallery li:nth-of-type(6n+0) { margin-righ
.gallery {
list-style-type: none;
}
.gallery li {
float: left;
height: 130px;
width: 130px;
margin-bottom: 26px;
margin-right: 26px;
}
.gallery li:nth-of-type(6n+0) {
margin-right: 0px;
}
但我知道IE8不会识别第n个类型选择器。有没有办法
理想情况下,解决方案需要响应,因为站点是基于基础框架的。目前,它工作良好,大小可以缩小到两列,我可以通过媒体查询将
更改为跨300px工作。在这种情况下,我将使用负边距方法
.gallery {
list-style-type: none;
margin-left: -26px;
}
.gallery li {
float: left;
height: 130px;
width: 130px;
margin-bottom: 26px;
margin-left: 26px;
}
您可以尝试使用而不是Selectivizr
它确实支持为IE添加第n个类型的nth,而不需要任何其他LIB
另一方面,它也在IE中实现了一系列其他功能和修复,这可能是您想要的,也可能不是您想要的。如果使用其他多边形填充,则需要检查它是否冲突。不过值得一试。谢谢你,瑞克。很简单,我看不出来:-/