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,62 @@
<!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>css3动画</title>
<style>
.box {
width: 150px;
height: 150px;
background: red;
animation: changeColor 3s infinite alternate;
}
@keyframes changeColor {
/* 开始第一步
from {
box-shadow: 1px 1px 1px #000;
border-radius: 0;
background: red;
}
最后一步
to {
box-shadow: 1px 1px 24px #000;
border-radius: 100%;
background: yellow;
} */
0% {
box-shadow: 1px 1px 1px #000;
border-radius: 0;
background: red;
}
50% {
box-shadow: 1px 1px 1px #000;
border-radius: 50%;
background: blue;
}
100% {
box-shadow: 1px 1px 1px #000;
border-radius: 100%;
background: yellow;
}
}
</style>
</head>
<body>
<div class="box">
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

View File

@@ -0,0 +1,27 @@
<!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>
.box {
width: 42px;
height: 45px;
background: url("./img/icenter.png");
background-position: 0 -45px;
background-repeat: no-repeat;
}
</style>
</head>
<body>
<div class="box">
</div>
</body>
</html>

View File

@@ -0,0 +1,55 @@
<!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>
.main {
position: relative;
width: 400px;
height: 400px;
border: 1px solid #000;
}
.box {
position: absolute;
width: 240px;
height: 240px;
border-radius: 100%;
background: url("./img/back.png");
background-size: cover;
animation: changeBack 0.1s infinite;
}
img {
position: absolute;
width: 100px;
border-radius: 100%;
transition: all 1s ease;
left: 70px;
top: 70px;
}
img:hover {
transform: rotate(360deg)
}
@keyframes changeBack {
0% {
transform: rotate(0deg)
}
100% {
transform: rotate(360deg)
}
}
</style>
</head>
<body>
<div class="main">
<div class="box"></div>
<img src="./img/user.png" alt="">
</div>
</body>
</html>

View File

@@ -0,0 +1,64 @@
<!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>
ul,body{
margin: 0;
padding: 0;
}
ul li {
list-style: none;
}
.pc li {
float: left;
}
.wap {
display: none;
}
@media screen and (max-width: 750px) {
.wap {
display: block;
}
.pc {
display: none;
}
}
</style>
</head>
<body>
<ul class="pc">
<li>电脑上的导航条 1</li>
<li>电脑上的导航条 2</li>
<li>电脑上的导航条 3</li>
<li>电脑上的导航条 4</li>
<li>电脑上的导航条 5</li>
<li>电脑上的导航条 6</li>
<li>电脑上的导航条 7</li>
<li>电脑上的导航条 8</li>
<li>电脑上的导航条 9</li>
<li>电脑上的导航条 10</li>
</ul>
<ul class="wap">
<li>电脑上的导航条 1</li>
<li>电脑上的导航条 2</li>
<li>电脑上的导航条 3</li>
<li>电脑上的导航条 4</li>
<li>电脑上的导航条 5</li>
<li>电脑上的导航条 6</li>
<li>电脑上的导航条 7</li>
<li>电脑上的导航条 8</li>
<li>电脑上的导航条 9</li>
<li>电脑上的导航条 10</li>
</ul>
</body>
</html>

View File

@@ -0,0 +1,45 @@
<!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>
.box {
width: 80px;
margin: 100px auto;
position: relative;
}
span {
position: absolute;
top: -18px;
right: -14px;
background: red;
color: #fff;
font-size: 12px;
border-radius: 5px;
padding: 2px 3px;
transform: scale(0.8);
animation: changeTop .8s infinite alternate;
}
@keyframes changeTop {
0% {
top: -18px;
}
100% {
top: -25px;
}
}
</style>
</head>
<body>
<div class="box">
GIF动态图
<span>new</span>
</div>
</body>
</html>

View File

@@ -0,0 +1,23 @@
1雪碧图
是什么?
将很多张小的图标放到一张大的背景图上
好处:
减少网络请求的次数,提高页面访问速度,节省用户流量
实现:
1建立空的盒子注意盒子的大小和你要显示的图片大小应该一致
2通过 backgroundbackground-position
css3动画
1定义动画 @keyframes 动画名称 {}
2使用动画