div+css实现黑胶唱片机播放碟片音乐转动动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现黑胶唱片机播放碟片音乐转动动画效果代码
代码标签: div css 黑胶 唱片机 播放 碟片 音乐 转动 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
:root {
--bs1: #4d4d4d;
--bs2: #3d3d3d;
--arm: #dedede;
--bg2: #ffc000;
--bg4: #00b91f;
--bg1: #a27dc2;
--bg3: #2a92bf;
}
body {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
background:
radial-gradient(circle at 50% 50%, #fff0, #000c),
radial-gradient(farthest-side at bottom left, var(--bg1), #fff0),
radial-gradient(farthest-side at top left, var(--bg2), #fff0),
radial-gradient(farthest-corner at bottom right, var(--bg3), #fff0),
radial-gradient(farthest-corner at top right, var(--bg4), #fff0);
}
.content {
width: 80vmin;
height: 60vmin;
background-size: cover;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.content * {
position: absolute;
}
.turntable {
width: 61%;
height: 49.5%;
background: var(--bs1);
transform: rotate(-30deg) skewX(30deg);
margin-top: 4%;
border-radius: 5%;
box-shadow:
-0.5vmin 0.5vmin 0 0 var(--bs2),
-1vmin 0.9vmin 0 0 var(--bs2),
-1.5vmin 1.35vmin 0 0 var(--bs2),
-2vmin 1.8vmin 0 0 var(--bs2),
-4.75vmin 4vmin 0.25vmin 0 #0004;
}
.turntable:before {
content: "";
background: var(--bs2);
width: 17%;
height: 24%;
position: absolute;
left: 78%;
top: 4%;
border-radius: 100%;
box-shadow: -0.1vmin 0.1vmin 0.25vmin 0 #000 inset;
}
.legs {
width: 100%;
height: 100%;
}
.legs span {
top: 64.5%;
left: 8.25%;
background: linear-gradient(90deg, #242423 35%, #333333 35%);
width: 6.5%;
height: 4%;
border-radius: 0 0 100% 100%;
}
.legs span + span {
top: 87.75%;
left: 39.25%;
}
.legs span + span + span {
top: 52.35%;
left: 85.25%;
}
.wheel {
background: linear-gradient(90deg, #242423 35%, #333333 35%);
width: 6.5%;
height: 4%;
border-radius: 0 0 100% 100%;
top: 77.75%;
left: 39%;
}
.wheel:before {
content: ".........完整代码请登录后点击上方下载按钮下载查看
















网友评论0