响应式布局基本实现

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-600px)" >
<!--
media=" only screen and (max-640px)"
当屏幕最大宽度为640时才会显示
-->

  内嵌样式

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

原文地址:https://www.cnblogs.com/wujieBlogs/p/5917360.html