CSS3媒体查询

Html Css

 /* Smartphones (portrait and landscape) ----------- */

@media only screen

and (min-device-width : 320px) 

and (max-device-width : 480px) {

/* Styles */

}

 

/* Smartphones (landscape) ----------- */

@media only screen

and (min-width : 321px) {

/* Styles */

}

 

/* Smartphones (portrait) ----------- */

@media only screen

and (max-width : 320px) {

/* Styles */

}

 

/* iPads (portrait and landscape) ----------- */

@media only screen

and (min-device-width : 768px) 

and (max-device-width : 1024px) {

/* Styles */

}

 

/* iPads (landscape) ----------- */

@media only screen

and (min-device-width : 768px) 

and (max-device-width : 1024px) 

and (orientation : landscape) {

/* Styles */

}

 

/* iPads (portrait) ----------- */

@media only screen

and (min-device-width : 768px) 

and (max-device-width : 1024px) 

and (orientation : portrait) {

/* Styles */

}

 

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

@media only screen

and (min-width : 1224px) {

/* Styles */

}

 

/* Large screens ----------- */

@media only screen

and (min-width : 1824px) {

/* Styles */

}

 

/* iPhone 4 ----------- */

@media

only screen and (-webkit-min-device-pixel-ratio : 1.5),

only screen and (min-device-pixel-ratio : 1.5) {

/* Styles */

}

相关内容推荐

JQ特效之:页面向上滚动时弹出模块

页面向上滚动弹出模块这个特效比较适合资源类网站,用户来到你的网站后一般动作就算向下翻页找,找着找着发现没找到,一般会回到顶部去找导航栏之类的,这个时候就会产生一个

返回
顶部