css+js实现城市夜晚马路路灯下雪花飞舞动画效果代码
代码语言:html
所属分类:动画
代码描述:css+js实现城市夜晚马路路灯下雪花飞舞动画效果代码
代码标签: css js 城市 夜晚 马路 路灯 雪花 飞舞 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
.frame {
position: relative;
margin: auto;
aspect-ratio: 1/1.5;
height: 99%;
background: linear-gradient(to bottom, #3E383A, #4D4A4E, #444452);
overflow: hidden;
}
.frame .ambient {
z-index: 1;
position: absolute;
background: yellow;
inset: -35%;
top: -56%;
left: -29%;
mask-image: radial-gradient(circle, #ffffffff, #ffffff66 13%, #ffffff00 100%);
-webkit-mask-image: radial-gradient(circle, #ffffffff, #ffffff66 13%, #ffffff00 100%);
opacity: 0.25;
}
.frame .weather {
z-index: 1;
position: absolute;
inset: -2%;
mask-image: radial-gradient(circle, #ffffffff, #ffffff66 13%, #ffffff33 30%, #ffffff11 100%);
-webkit-mask-image: radial-gradient(circle, #ffffffff, #ffffff66 13%, #ffffff33 30%, #ffffff15 100%);
top: -15%;
left: -4%;
}
.frame .snow {
z-index: 1;
position: absolute;
inset: 0;
}
.frame .snow .dot {
height: 0.35vh;
width: 0.35vh;
max-width: 4px;
max-height: 4px;
border-radius: 40%;
position: absolute;
background: whitesmoke;
}
.frame [class^=bat] .level {
padding-right: 6%;
display: flex;
align-items: center;
justify-content: space-evenly;
rotate: -16deg;
margin-bottom: 27%;
}
.frame [class^=bat] .level .window {
aspect-ratio: 1/1;
background: #20181599;
transform: skew(-10deg);
width: 14%;
}
.frame [class^=bat] .level .window.tv {
animation-name: watchingtv;
animation-duration: 4s;
animation-timing-function: linear;
animation-iteration-count: infinite;
box-shadow: 0 0 16px #7AABC6;
}
.frame [class^=bat] .level .window.yellow {
background: #DF9A62AA !important;
box-shadow: 0 0 16px #DF9A62;
}
.frame [class^=bat] .level .window.green {
background: #67A796AA !important;
box-shadow: 0 0 16px #67A796;
}
.frame [class^=bat] .level .window.white {
background: #CDC4BCAA !important;
box-shadow: 0 0 16px #CDC4BC;
}
.frame [class^=bat] .level .window.blue {
background: #7AABC6AA !important;
box-shadow: 0 0 16px #7AABC6;
}
.frame .bat-1 {
position: absolute;
right: -21%;
bottom: 0;
width: 45%;
height: 80%;
background: linear-gradient(to bottom, #201815, #2D2320);
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0