jquery+css实现老唱片留声机转动动画效果代码

代码语言:html

所属分类:动画

代码描述:jquery+css实现老唱片留声机转动动画效果代码

代码标签: jquery css 老唱片 留声机 转动 动画

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

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css">
<style>
    * {
  box-sizing: border-box;
}

.player {
  margin: 20px;
  padding: 20px;
  position: relative;
  width: 924px;
  height: 520px;
  background: #F13030;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.player .controls {
  width: calc(100% - 500px);
  height: 100%;
  display: flex;
  flex-wrap: wrap;
}
.player .controls .needleContainer, .player .controls .button, .player .controls .switches, .player .controls .empty {
  width: 50%;
  heighT: 50%;
}
.player .controls .button .dial-button {
  width: 100px;
  height: 100px;
  background: radial-gradient(black 5%, #090909 15%, #191919 60%);
  box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.35);
  border-radius: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
}
.player .controls .button .plugs {
  color: white;
}
.player .controls .button .plugs .aux {
  width: 20px;
  height: 20px;
  border-radius: 100%;
  background: #eee;
  box-shadow: 0px 0px 0px 3px #aaa;
  position: relative;
}
.player .controls .button .plugs .aux i {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 150%);
}
.player .controls .needleContainer {
  position: relative;
  display: flex;
}
.player .controls .needleContainer .switch {
  width: 10px;
  height: 50px;
  background: black;
  margin-left: 20px;
  margin-top: 10px;
  position: relative;
}
.player .controls .needleContainer .switch.active .switchToggleCont .swicthToggle {
  transform: translate(0, -15px) rotateX(0deg);
}
.player .controls .needleContainer .switch .switchToggleCont {
  position: absolute;
  left: 4px;
  perspective: 600px;
}
.player .controls .needleContainer .switch .switchToggleCont .swicthToggle {
  position: relative;
  transition: 0.35s ease-in-out;
  transform-style: preserve-3d;
  widtH: 2px;
  height: 40px;
  transform: translate(0, -15px) rotateX(180deg);
  transform-origin: bottom;
  animation: needleSwitch 5s ease-in-out infinite;
}
.player .controls .needleContainer .switch .switchToggleCont .swicthToggle .front, .player .controls .needleContainer .switch .switchToggleCont .swicthToggle .back {
  position: absolute;
  top: 0;
  left: 0;
  widtH: 2px;
  height: 40px;
  background: grey;
}
.player .controls .needleContainer .switch .switchToggleCont .swicthToggle .front {
  z-index: 2;
}
.player .controls .needleContainer .switch .switchToggleCont .swicthToggle .back {
  transform: rotateX(180deg);
}
.player .contro.........完整代码请登录后点击上方下载按钮下载查看

网友评论0