css布局实现一个老式留声机播放音乐效果

代码语言:html

所属分类:动画

代码描述:css布局实现一个老式留声机播放音乐效果

代码标签: 一个 老式 留声机 播放 音乐 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
*,
*:before,
*:after {
  box-sizing: border-box;
}

body {
  position: absolute;
  margin: 0;
  padding: 0;
  top: 50%;
  left: 50%;
  margin-right: -50%;
  transform: translate(-50%, -50%);
}

main {
  position: relative;
  background-image: url("http://repo.bfw.wiki/bfwrepo/image/5f14d32694ad3.png");
  height: 540px;
  width: 675px;
  border-radius: 6px;
  background-size: cover;
  box-shadow: -5px 5px 22px 2px rgba(0, 0, 0, 0.75);
}

.record-player {
  position: absolute;
  top: 40px;
  left: 40px;
  box-shadow: -6px 6px 9px #000000de;
  border-radius: 50%;
  z-index: 0;
}

.vinyl {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vinyl-circle {
  position: relative;
  width: 468px;
  height: 468px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-radial-gradient(
    circle,
    #000,
    #000 4px,
    #131313 4px,
    #131313 6px
  );
  border-radius: 50%;
}

.vinyl-circle::before {
  content: "";
  background-image: url("http://repo.bfw.wiki/bfwrepo/image/5d653ba895333.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_300,h_300,/quality,q_90");
  background-size: 150px;
  top: 152px;
  left: 152px;
  border-radius: 50%;
  width: 165px;
  height: 165px;
  z-index: 0;
  position: absolut.........完整代码请登录后点击上方下载按钮下载查看

网友评论0