css+jquery实现星球大战光剑打开关闭动画带音效效果代码

代码语言:html

所属分类:动画

代码描述:css+jquery实现星球大战光剑打开关闭动画带音效效果代码

代码标签: 光剑 打开 关闭 动画 音效 效果

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


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

<head>

  <meta charset="UTF-8">

  
  
<style>
body {
  background: black;
}
/* Helmet */
.border {
  border: 1px solid #222;
}
.hidden {
  display: none;
}
.helmet {
  width: 400px;
  height: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.helmet__top {
  position: absolute;
  z-index: 2;
  display: block;
  top: 50px;
  width: 20px;
  height: 170px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border-bottom-left-radius: 80% 20%;
  border-bottom-right-radius: 80% 20%;
}
.helmet__top:before,
.helmet__top:after {
  content: '';
  display: block;
  position: absolute;
  width: 130px;
  height: 150px;
  top: 5px;
  z-index: -1;
}
.helmet__top:before {
  right: 0;
  border-top-left-radius: 130px;
  background: linear-gradient(to right, gray, #333, #222 100px, #222 110px, gray 112px, gray 115px, #222 116px);
}
.helmet__top:after {
  left: 10px;
  border-top-right-radius: 130px;
  background: linear-gradient(to right, #222, #222 9px, gray 9px, gray 10px, #222 12px, black 60px);
}
.helmet__front {
  position: absolute;
  z-index: 5;
  display: block;
  top: 175px;
  width: 20px;
  height: 40px;
}
.helmet__front:before,
.helmet__front:after {
  content: '';
  display: blo.........完整代码请登录后点击上方下载按钮下载查看

网友评论0