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

View File

@@ -0,0 +1,61 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>rem</title>
<style>
body {
margin: 0;
}
html {
font-size: 20px;
}
.box {
width: 9.34rem;
height: 9.34rem;
float: left;
border: 1px solid #000;
box-sizing: border-box;
}
@media only screen and (min-width: 320px) {
html {
font-size: 17.1px !important;
}
}
@media only screen and (min-width: 375px) {
html {
font-size: 20px !important;
}
}
@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;
}
}
</style>
</head>
<body>
<div class="box_1 box">
</div>
<div class="box_2 box">
</div>
</body>
</html>

View File

@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>弹性盒子</title>
<style>
body {
margin: 0;
}
ul li {
list-style: none;
}
.box {
display: flex;
}
</style>
</head>
<body>
<ul class="box">
<li>li 1</li>
<li>li 2</li>
<li>li 3</li>
</ul>
</body>
</html>

View File

@@ -0,0 +1,7 @@
rem: 一种新的尺寸单位
元素实际宽高(px) = 你设置的rem * html 上的font-size(浏览器默认16px)
1css 媒体查询
2js 检查屏幕dpi动态修改 font-siz