@media设备名only(拔取前提)not(拔取前提)and(设备拔取前提),设备二{sRules}
<linkrel=“stylesheet”type=“text/css”media=“onlyscreenand(max-width:480px),onlyscreenand(max-device-width:480px)”href=“link.css”/>
@media(min-device-width:1024px)and(max-width:989px),screenand(max-device-width:480px),(max-device-width:480px)and(orientation:landscape),(min-device-width:480px)and(max-device-width:1024px)and(orientation:portrait){srules}
/*当扫瞄器的可视地区小于980px*/
@mediascreenand(max-width:980px){
#wrap{width:90%;margin:0auto;}
#content{width:60%;padding:5%;}
#sidebar{width:30%;}
#footer{padding:8%5%;margin-bottom:10px;}
}
/*当扫瞄器的可视地区小于650px*/
@mediascreenand(max-width:650px){
#header{height:auto;}
#searchform{position:absolute;top:5px;right:0;}
#content{width:auto;float:none;margin:20px0;}
#sidebar{width:100%;float:none;margin:0;}
}
/*禁用iPhone中Safari的字号主动调剂*/
html{
-webkit-text-size-adjust:none;
}
/*设置HTML5元素为块*/
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{
display:block;
}
/*设置图片视频等自顺应调剂*/
img{
max-width:100%;
height:auto;
width:auto9;/*ie8*/
}
.videoembed,.videoobject,.videoiframe{
width:100%;
height:auto;
}
<metaname=“viewport”content=“width=device-width;initial-scale=1.0”>
<!--[ifltIE9]>
<scriptsrc=“http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js”>
</script><![endif]-->
欢迎光临 仓酷云 (http://ckuyun.com/) | Powered by Discuz! X3.2 |