<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
<title>响应式布局</title>
<style type="text/css">
#div0{
width: 100px;
height: 200px;
}
@media screen and (min-device-width:200px) and (max-device-width:300px){
#div0{
background-color: red;
}
}
@media screen and (min-device-width:301px) and (max-device-width:400px){
#div0{
background-color: green;
}
}
@media screen and (min-device-width:401px) and (max-device-width:500px){
#div0{
background-color: yellow;
}
}
</style>
</head>
<body>
<div id="div0">
</div>
</body>
</html>
image.png
media引入其他方式(一)
image.png
media引入其他方式(二)
image.png
弹性盒子
image.png
image.png
image.png
image.png
image.png