2016-06-10 71 views
0

我无法在IE 9中获得nth-type类型的工作 - >目前我的ccs代码在IE 8上工作。任何人都可以提出解决方法吗?在桌面设备上我正在想4个COLS和移动至1个COLnth类型不工作在IE 9

URL 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; 
    } 

回答

0

欢呼声从IE 9-> IE固定间隔8件作品(我已.author块的变化为:第n-的型,然后进行的所有媒体查询第n的式(4N)代替

 .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-block:nth-of-type(4n) { 
     margin-right: 0; 
    } 
    /* 1,3,5 */ 

    .author-block: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-block:nth-of-type(4n) { 
     margin-right: 0; 
     } 
     /* 1,3,5 */ 
     .author-block:nth-of-type(4n+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-block:nth-of-type(4n) { 
      margin-right: 0; 
     } 
     /* 1,3,5 */ 
     .author-block:nth-of-type(4n+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-block:nth-of-type(4n) { 
      margin-right: 0; 
      } 
      /* 1,3,5 */ 
      .author-block:nth-of-type(4n+1) { 
      clear: both; 
      } 
      /* Desktops and laptops ----------- */ 
      @media only screen and (min-width: 1224px) { 
      .author-block { 
       width: 24%; 
       margin-right: 10px; 
       float: left; 
      } 
0

查询第n的式(1N)第n的式(2N)的组合,以修复IE问题我添加关闭}所有查询。doh

。作者块{

/宽度:48%;/

宽度:23%;

/margin-right:3.8%;/

margin-right:9px;

float:left;

/margin-bottom:1.5em;/

/font-size:14px!important;/

}

/* 2,4,6 */

.author块:第n的式(4N){

余量右:0;

}

/* 1,3,5 */

.author块:第n的式(4N + 1){

明确:两者;

}

/*智能手机(横向)----------- */

@media只有屏幕和(最小宽度:321px){

。作者块{

width: 100%; 

margin-right: 10px; 

float: left; 

}

/* 2,4,6 */

。作者块:第n的式(4N){

margin-right: 0; 

}

/* 1,3,5 */

.author块:第n的式(4N 1){

clear: both; 

}

}

/*台式机和笔记本电脑----------- */

@media只有屏幕和(最小宽度:480像素){

.author-block { 

    width: 48%; 

    margin-right: 10px; 

    float: left; 

} 

/* 2,4,6 */ 

.author-block:nth-of-type(4n) { 

    margin-right: 0; 

} 

/* 1,3,5 */ 

.author-block:nth-of-type(4n+1) { 

    clear: both; 

} 

}

/* Desktops and laptops ----------- */ 

@media只有屏幕和(最小宽度:768px){

.author-block { 

    width: 30%; 

    margin-right: 10px; 

    float: left; 

    } 

    /* 2,4,6 */ 

    .author-block:nth-of-type(4n) { 

    margin-right: 0; 

    } 

    /* 1,3,5 */ 

    .author-block:nth-of-type(4n+1) { 

    clear: both; 

    } 

}

@media只有屏幕和(最小宽度:1224px){

.author-block { 

     width: 24%; 

     margin-right: 10px; 

     float: left; 

    } 

}