实现响应式布局效果

<link href="xiangyingshi.css" type="text/css" rel="stylesheet" media="only screen and(max-width:640px)" />//最大不能超过640px
<style>
@media screen and (min-width:640px){//最小不能小于640px
body{
background-color:#003;}
}
</style>
<body>
</body>
</html>

<meta name="viewport" content="width=device-width,initial-scale=1" />//content="width=device-width指定设备的宽,initial-scale=1按照原比例进行缩放

@media screen and (min-width: 600px;) and (max-width: 960px){}//最小600最大960px;

posted @ 2015-08-04 17:50  大发明家  阅读(267)  评论(0编辑  收藏  举报