Files
ClassContent/历届学生/front-end-team-10/项目练习/学生项目/韩孟雪/2023-2-16/rem.html
2024-09-27 02:06:13 +08:00

50 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
padding: 0;
margin: 0;
}
html{
font-size: 16px;
}
.box{
width: 10rem;
height: 10rem;
background: blue;
float: left;
}
.box1{
background: red;
}
.box2{
background: yellow;
}
@media screen and (min-width:320px) and (max-width:px375){
html{
font-size: 85.333px;
}
}
@media screen and (min-width:375px) and (max-width:413px){
html{
font-size: 100px;
}
}
@media screen and(min-width:414px){
html{
font-size: 110.4px;
}
}
</style>
</head>
<body>
<div class=" box box1"></div>
<div class="box box2"></div>
</body>
</html>