【发布时间】:2016-10-10 19:58:49
【问题描述】:
我无法让 nth-of-type 在 IE 9 中工作 -> 目前我的 ccs 代码正在 IE 8 上工作。有人可以建议解决方法吗?在桌面上我想要 4 列和移动到 1 列
网址http://aboriginalart.org.au/aaaa/artist-members/
.author-block {
/*width: 48%;*/
width: 23%;
/*margin-right: 3.8%;*/
margin-right: 9px;
float: left;
/*margin-bottom: 1.5em;*/
/*font-size: 14px !important;*/
}
/* 2,4,6 */
.author-block1:nth-of-type(4n) {
margin-right: 0;
}
/* 1,3,5 */
.author-block1:nth-of-type(4n+1) {
clear: both;
}
/* Smartphones (landscape) ----------- */
@media only screen and (min-width : 320px) {
.author-block {
width: 100%;
margin-right: 10px;
float: left;
}
/* 2,4,6 */
.author-block1:nth-of-type(1n) {
margin-right: 0;
}
/* 1,3,5 */
.author-block1:nth-of-type(1n+1) {
clear: both;
}
/* Desktops and laptops ----------- */
@media only screen and (min-width : 480px) {
.author-block {
width: 48%;
margin-right: 10px;
float: left;
}
/* 2,4,6 */
.author-block1:nth-of-type(2n) {
margin-right: 0;
}
/* 1,3,5 */
.author-block1:nth-of-type(2n+1) {
clear: both;
}
/* Desktops and laptops ----------- */
@media only screen and (min-width : 768px) {
.author-block {
width: 30%;
margin-right: 10px;
float: left;
}
/* 2,4,6 */
.author-block1:nth-of-type(3n) {
margin-right: 0;
}
/* 1,3,5 */
.author-block1:nth-of-type(3n+1) {
clear: both;
}
/* Desktops and laptops ----------- */
@media only screen and (min-width : 1224px) {
.author-block {
width: 24%;
margin-right: 10px;
float: left;
}
/* 2,4,6 */
.author-block1:nth-of-type(4n) {
margin-right: 0;
}
/* 1,3,5 */
.author-block1:nth-of-type(4n+1) {
clear: both;
}
【问题讨论】:
标签: css internet-explorer css-selectors