first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>rem2</title>
<style>
body {
margin: 0;
padding: 0;
}
html {
font-size: 20px;
}
@media only screen and (min-width: 400px) {
html {
font-size: 21.33333333px !important;
}
}
@media only screen and (min-width: 414px) {
html {
font-size: 22.08px !important;
}
}
@media only screen and (min-width: 480px) {
html {
font-size: 25.6px !important;
}
}
@media only screen and (min-width: 767px) {
html {
font-size: 40.96px !important;
}
}
.box {
width: 9.375rem;
height: 9.375rem;
background: red;
float: left;
}
</style>
</head>
<body>
<div class="box"></div>
<div class="box" style="background: yellow;"></div>
</body>
</html>

View File

@@ -0,0 +1,11 @@
rem: 相对于浏览器html标签上的font-size来计算的
默认html上font-size 16px
1rem == 16px
你写的rem * html font-size = 实际尺寸
为什么要用rem
flex