div+css点亮盒子灯光开关效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css点亮盒子灯光开关效果代码

代码标签: div css 点亮 盒子 灯光 开关

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

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />
   <style>
body{
    background: black;
    margin: 200px;
}
.container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
  user-select: none;
}

.simple-text {
  position: absolute;
  bottom: -40px;
  width: 120px;
  text-align: center;
  color: white;
  font-size: 16pt;
  font-weight: 800;
  font-family: monospace;
}

.torch {
  display: flex;
  justify-content: center;
  height: 150px;
}

.head,
.stick {
  position: absolute;
  width: 30px;
  transform-style: preserve-3d;
  transform: rotateX(-30deg) rotateY(45deg);
}

.stick {
  position: relative;
  height: 120px;
}

.face {
  position: absolute;
  transform-style: preserve-3d;
  width: 30px;
  height: 30px;
  display: grid;
  grid-template-columns: 50% 50%;
  grid-template-rows: 50% 50%;
  background-color: #000000;
}

.top {
  transform: rotateX(90deg) translateZ(15px);
}

.left {
  transform: rotateY(-90deg) translateZ(15px);
}

..........完整代码请登录后点击上方下载按钮下载查看

网友评论0