div+css实现一个逼真相机效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css实现一个逼真相机效果代码

代码标签: div css 逼真 相机

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


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

<head>

  <meta charset="UTF-8">

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

body {
  font-size: 10px;
  background-repeat: no-repeat;
  background-size: 700px;
  background-position: 50% -9.2%;
}

.snaptouch {
  font-size: 1.5vmin;
  width: 76em;
  height: 56em;
  position: absolute;
  top: 49%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(teal 49%, yellow 51%) 50% 100%/15em 15em;
  background-repeat: no-repeat;
}
.snaptouch .logo {
  font-family: calibri;
  color: #DEDAD9;
  position: absolute;
  border: 1px solid hotpink;
}
.snaptouch .button {
  border: 1px solid orange;
  width: 9em;
  height: 5em;
  border-top-left-radius: 3em;
  border-top-right-radius: 3em;
  position: absolute;
  top: 11%;
  left: 8%;
  background: #FF7476;
  box-shadow: inset rgba(0, 0, 0, 0.15) 0px 0px 0px 0.25em;
}
.snaptouch .flash {
  width: 21em;
  height: 7.5em;
  border-top-left-radius: 1.5em;
  border-top-right-radius: 1.5em;
  position: absolute;
  left: 50%;
  transform: translatex(-50%);
  overflow: hidden;
  box-shadow: inset 0px 0px 0.5em rgba(255, 255, 255, 0.5);
  background: linear-gradient(to left, rgba(0, 0, 0, 0.7), rgba(51, 51, 51, 0)) 100% 100%/0.5em 100%, #333333;
  background-repeat: no-repeat;
  border-bottom-left-radius: 1em;
  border-bottom-right-radius: 1em;
}
.snaptouch .flash .flash-inner {
  width: 100%;
  height: 90%;
  position: absolute;
  bottom: 0;
  border-radius: inherit;
  box-shadow: 0em -1.2em 2px -2px #333333 inset, 0em -1.2em 5px -2px rgba(255, 255, 255, 0.3) inset, 0 0.6px 15em -0.2em rgba(0, 0, 0, 0.2) inset, rgba(204, 219, 232, 0.5) 0px 0.3em 2.6em 0px;
  background: #303030;
}
.snaptouch .flash .flash-middle {
  width: 11em;
  height: 5.2em;
  border: 0.2em solid #050505;
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 1.2em;
  box-shadow: rgba(255, 255, 255, 0.3) -0.2em -0.2em 0.2em 0px, 0 4px 2px -2px rgba(0, 0, 0, 0.5), 0 -4px 2px -2px rgba(0, 0, 0, 0.5) inset;
}
.snaptouch .flash .flash-middle-inner {
  width: 95%;
  height: 95%;
  border-radius: inherit;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: rgba(255, 255, 255, 0.1) 0px -0.3em 1px inset, rgba(255, 255, 255, 0.15) 0px 0.3em 5px inset, rgba(0, 0, 0, 0.7) 0px 0em 0.15em 0.3em inset;
  background: #7A7A7A;
  background: #4A4A4A;
}
.snaptouch .flash .flash-middle-inner-inner {
  width: 85%;
  height: 72%;
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(50deg, transparent 92%, rgba(0, 0, 0, 0.2), #a2a2a2 95%) 70% 100%/78% 1.2em, linear-gradient(to right, #7E7E7E, #7E7E7E) 0% 100%/100% 0.3em, linear-gradient(-40deg, #8B8B8B, 89%, transparent 51%) 0% 100%/100% 1em, linear-gradient(to right, #7E7E7E, #7E7E7E) 0% 0%/100% 0.3em, linear-gradient(to right, #7E7E7E, #7E7E7E) 100% 50%/0.3em 100%, linear-gradient(to right, #7E7E7E, #7E7E7E) 0% 0%/0.3em 100%, linear-gradient(to right, #A2A2A2, #A1A1A1) 100% 100%/1em 100%, linear-gradient(to right, #7E7E7E, #575759, #59585B) 0% 0%/1em 100%, linear-gradient(#6C6C6C 10%, rgba(50, 50, 50, 0.6) 70%) 0% 0%/100% 1.3em, linear-gradient(to left, rgba(0, 0, 0, 0.7), rgba(51, 51, 51, 0)) 100% 100%/0.5em 100%, linear-gradient(to top, #2E2E2E 55%, transparent) 10% 100%/100% 1.4em;
  background-repeat: no-repeat;
}
.snaptouch .flash .big-circle {
  width: 3em;
  height: 3em;
  border: 0.2em solid #000;
  border-radius: 50%;
  position: absolute;
  right: 5.3%;
  top: 18%;
  background: radial-gradient(100% 100% at 50% 50%, rgba(254, 254, 254, 0.5) 50%, rgba(161, 163, 167, 0.2) 51%) 50% 300%/3em 3em, #A1A3A7;
  background-repeat: no-repeat;
}
.snaptouch .camera-body {
  width: 100%;
  box-shadow: rgba(47, 47, 47, 0.5) -1.3em -0.3em 0.6em 0.1em inset, rgba(47, 47, 47, 0.5) -1.3em -0.3em 0.6em 0.1em inset, rgba(204, 219, 232, 0.4) 0px 0.3em 2.6em 0px inset;
  height: 88%;
  position: absolute;
  bottom: 0;
  border-radius: 7em;
  border-bottom-right-radius: 7.5em;
  border-bottom-left-radius: 7.5em;
  background: #2F2F2F;
}
.snaptouch .camera-body .camera-stripes {
  z-index: 4;
  width: 100%;
  height: 3.9em;
  position: absolute;
  top: 49.5%;
  transform: translatey(-50%);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1), transparent) 100% 0%/50% 10%, linear-gradient(to right, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.4), transparent) 72% 0%/4em 90%, linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2), transparent) 98% 50%/2em 5em, linear-gradient(to bottom, #FA2CA5, #F929A4 1em) 100% 0%/60% 0.6em, linear-gradient(to bottom, #FFA231, #FFA231 1em) 100% 0.6em/60% 0.6em, linear-gradient(to bottom, #FFE400, #FFE400 1em) 100% 1.2em/60% 0.6em, linear-gradient(to bottom, #FAFF77, #FAFF77 1em) 100% 1.8em/60% 0.6em, linear-gradient(to bottom, #86DA3D, #86DA3D 1em) 100% 2.4em/60% 0.6em, linear-gradient(to bottom, #3BB6FA, #3BB6FA 1em) 100% 3em/60% 0.6em;
  background-repeat: no-repeat;
}
.snaptouch .camera-body .camera-inner {
  box-shadow: rgba(47, 47, 47, 0.5) -1.3em -0.3em 0.6em 0.1em inset, rgba(4.........完整代码请登录后点击上方下载按钮下载查看

网友评论0