<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
@media screen and (min-width: 980px){
html{
font-size: 25px;
}
}
@media (min-width: 541px) and (max-width: 979px){
html{
font-size: 20px;
}
}
@media screen and (max-width: 540px){
html{
font-size: 15px;
}
}
.box{
width: 12rem;
height: 8rem;
background:green;
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
@media screen and (min-width: 980px){
html{
font-size: 25px;
}
}
@media (min-width: 541px) and (max-width: 979px){
html{
font-size: 20px;
}
}
@media screen and (max-width: 540px){
html{
font-size: 15px;
}
}
.box{
width: 12rem;
height: 8rem;
background:green;
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>