媒体查询CSS类

时间:2016-12-31 17:09:02

标签: html css wordpress css3

CSS类的媒体查询

使用.CSSTableGenerator作为表的css类。如何仅对此CSS类文件使用媒体查询?

/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
    body { 
        padding: 0; 
        margin: 0; 
        width: 320px; }
    }

/* iPads (portrait and landscape) ----------- */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
    body { 
        //width: 495px; 
    }
}

1 个答案:

答案 0 :(得分:0)

@media only screen and(max-width:992px){

}

@media only screen and(max-width:400px){

}

使用像这样保持Grater尺寸优先于下限