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,66 @@
<!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>rem</title>
<script>
window.onload = function () {
getRem(750, 100)
};
window.onresize = function () {
getRem(750, 100)
};
function getRem(pwidth, prem) {
var html = document.getElementsByTagName("html")[0];
var oWidth = document.body.clientWidth || document.documentElement.clientWidth;
html.style.fontSize = oWidth / pwidth * prem + "px";
}
</script>
<style>
body {
margin: 0;
}
/* html {
font-size: 100px;
} */
/* @media screen and (width:414px) {
body {
background: yellow;
}
} */
.box {
width: 3.75rem;
height: 3.75rem;
float: left;
}
.box_1 {
background: red;
}
.box_2 {
background: yellow;
}
/* 真实尺寸 = 你写rem * html上的 font-size */
/* 动态修改html上的font-size
1.媒体查询 @media */
屏幕的宽度 / 传过来图片的宽度 * 100
</style>
</head>
<body>
<div class="box box_1"></div>
<div class="box box_2"></div>
</body>
</html>

View File

@@ -0,0 +1,26 @@
<!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>媒体查询</title>
<style>
body {
width: 100%;
height: 100vh;
background: red;
margin: 0;
}
@media screen and (min-width:100px) and (max-width:400px) {
body {
background: yellow;
}
}
</style>
</head>
<body>
</body>
</html>

View File

@@ -0,0 +1,93 @@
<!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>
input {
width: 250px;
transition: all 2s cubic-bezier(0.7, -0.25, 0.84, 1.58);
}
input:hover {
width: 400px;
}
@keyframes an {
from {
width: 200px;
height: 200px;
background: red;
}
to {
width: 300px;
height: 300px;
background: blue;
}
}
/* .box {
width: 200px;
height: 200px;
animation: an 3s ease ;
} */
.box1 {
width: 100px;
height: 75px;
background: red;
border: 1px solid black;
transform: translateY(200px);
/* {x,y轴平移} */
}
.box2 {
width: 100px;
height: 75px;
background: red;
border: 1px solid black;
transform: rotateX(10deg);
/* {正数顺时针旋转,单位deg} */
}
.box3 {
width: 100px;
height: 75px;
background: red;
border: 1px solid black;
transform: scale(3, 1);
/* {让元素放大缩小x,y} */
}
.box4 {
width: 100px;
height: 100px;
background: red;
border: 1px solid black;
transform: skew(100deg,0);
}
/* {斜切x,y} */
/* matrix()6个参数,包括旋转,缩放,移动(平移)和斜切 */
/* rotate: ();沿中心轴旋转 rotateX: ();沿X轴旋转 rotateY:():沿Y轴旋转 */
</style>
</head>
<body>
<input type="text" placeholder="输入密码">
<div class="box"></div>
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
<div class="box4"></div>
</body>
</html>