1 Star 0 Fork 1

uxuryplx/css_动画

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
毛玻璃效果.html 2.82 KB
一键复制 编辑 原始数据 按行查看 历史
uxuryplx 提交于 2023-07-07 15:36 . first commit
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
display: flex;
background-color: #fff;
}
.container{
width: 100%;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
}
.container .loader{
position: relative;
width: 150px;
height: 150px;
margin: 100px;
}
.container .loader.one span{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: block;
background:#5989ff;
border-radius: 50%;
animation: animate ease-in-out 2s infinite;
}
@keyframes animate {
0% ,100%{
transform: translateX(-80px);
}
50%{
transform: translateX(80px);
}
}
.container .loader.one span:nth-child(2){
left: 50%;
background: rgba(56, 109, 241, 0.05);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
animation-delay: -1s;
}
/* And Shadow*/
.container .loader.one span:before,
.container .loader.two span:nth-child(1):before{
content: '';
position: absolute;
bottom: -100px;
left: -20%;
width: 140%;
height: 40px;
border-radius: 50%;
background: radial-gradient(rgba(0,0,0,0.04),transparent,transparent);
}
.container .loader.two{
position: relative;
width: 180px;
height: 180px;
}
.container .loader.two span:nth-child(1){
position: absolute;
top: 10px;
left: 10px;
right: 10px;
bottom: 10px;
background: rgba(233, 30, 99, 0.05);
border-radius: 50%;
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
z-index: 2;
}
.container .loader.two span:nth-child(2){
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: block;
border-radius: 50%;
z-index: 1;
overflow: hidden;
animation: rotateCricle 1s linear infinite;
}
@keyframes rotateCricle{
0%{
transform: rotate(0deg);
}
100%{
transform: rotate(360deg);
}
}
.container .loader.two span:nth-child(2)::before{
content: "";
position: absolute;
top: -50%;
left: -50%;
width: 100%;
height: 100%;
background: #ff6;
}
</style>
<body>
<div class="container">
<div class="loader one">
<span> </span>
<span> </span>
</div>
<div class="loader two">
<span> </span>
<span> </span>
</div>
</div>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/plxvervewvr434232/css-animation.git
git@gitee.com:plxvervewvr434232/css-animation.git
plxvervewvr434232
css-animation
css_动画
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385