css实现滑动滑竿调节吊灯亮度效果代码

代码语言:html

所属分类:其他

代码描述:css实现滑动滑竿调节吊灯亮度效果代码

代码标签: css 滑动 滑竿 调节 吊灯 亮度

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

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

<head>
  <meta charset="UTF-8">
  

  
  
  
  
<style>
body {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  background-color: #000000;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}
.lamp-wrapper-main {
  position: relative;
  width: 100%;
  justify-content: center;
  display: flex;
}
.lamp-rope {
  position: absolute;
  width: 8px;
  height: 1200px;
  background: #fff;
  bottom: 100%;
  margin: auto;
}
.lamp-inner {
  position: relative;
  width: 140px;
  height: 100px;
  z-index: 2;
}
.lamp-main {
  background-color: #fff;
  transform: skewX(-5deg);
  height: 100px;
  width: 60%;
  position: absolute;
  top: 0;
  left: 0;
}
.lamp-main.top-wrapper {
  background: transparent;
  position: absolute;
  width: 130px;
  height: 20px;
  left: 6px;
  top: -17px;
}
.lamp-main.top-left-wrapper {
  width: 50%;
  height: 20px;
  left: 0;
  top: 0;
  transform: skewX(-5deg);
  border-radius: 80% 0 0 0;
}
.lamp-main.top-right-wrapper {
  width: 50%;
  height: 20px;
  left: 0;
  top: 0;
  transform: skewX(-5deg);
  border-radius: 80% 0 0 0;
}
.lamp-main.right-wrapper {
  transform: skewX(5deg);
  left: auto;
  right: 1px;
  border-radius: 0 80% 0 0;
}
.lamp-main.lamp-center-right {
  transform: skewX(5deg);
  left: auto;
  right: 0;
}
.lamp-main.lamp-bottom:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  background: #fff;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  opacity: 1;
}
.lamp-main.lamp-bottom {
  background: linear-gradient(#fffffa, #fdffb2);
  height: 30px;
  width: 150px;
  position: absolute;
  top: auto;
  bottom: -18px;
  left: -5px;
  border-radius: 50%;
  border-top: 3px solid #000;
  border-bottom: 2px solid #000;
}
.lamp-blub {
  position: absolute;
  width: 120px;
  height: 80px;
  top: 10px;
  left: 10px;
  border-radius: 5% 3% 38% 40%;
  background-color: #fdffb2;
  -webkit-filter: blur(15px);
  filter: blur(15px);
  z-index: 2;
  opacity: 0;
  transition: all 300ms;
}
.lamp-lamp-shadow {
  background: linear-gradient(#ffffed, #000 30%);
  width: 80%;
  height: 200vh;
  position: absolute;
  top: 150%;
  left: auto;
  border-radius: 50% 50% 0 0;
  -webkit-filter: blur(5px);
  filter: blur(5px);
  z-index: -1;
  opacity: 0;
  transition: all 300ms;
}
.lamp-input {
  width: 200px;
  padding: 15px;
  border-radius: 4px;.........完整代码请登录后点击上方下载按钮下载查看

网友评论0