CSS3中的Media Query(媒介查询):

  设备宽高:device-width,device-height

  渲染窗口的宽和高:width,height

  设备的手持方向:orientation

  设备的分辨率:resolution

使用方法:

  外联

  

<link href="css/bg.css" type="text/css" rel="stylesheet" media=" only screen and (max-width:600px)" >
<!--
media=" only screen and (max-width:640px)"
当屏幕最大宽度为640时才会显示
-->

  内嵌样式

<style type="text/css">
@media screen and (min-width:600px){
body{
background-color: fuchsia;
}
}
</style>

posted on 2016-09-28 17:41  JVAM  阅读(195)  评论(0编辑  收藏  举报