<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
div{
background-color: red;
height: 200px;
width: 500px;
}
@media only screen and (max-width: 600px) { /*//如果这个小于640px*/
div{
background-color: blue;
height: 500px;
}
}
</style>
</head>
<body>
<div>快要下课了,,哈哈哈</div>
</body>
</html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
div{
background-color: red;
height: 200px;
width: 500px;
}
@media only screen and (max-width: 600px) { /*//如果这个小于640px*/
div{
background-color: blue;
height: 500px;
}
}
</style>
</head>
<body>
<div>快要下课了,,哈哈哈</div>
</body>
</html>