div+css布局实现聚光灯效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css布局实现聚光灯效果代码

代码标签: div css 布局 聚光灯

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

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

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


  
  
<style>
body {
  margin: 0px;
  overflow: hidden;
  min-height: 100vh;
  background: #4bc1e9;
}

.container {
  position: relative;
  max-width: 900px;
  width: 100%;
  margin: 0px auto;
  display: flex;
  align-items: center;
  min-height: 100vh;
}
.container .spot_light {
  position: relative;
  height: 150px;
  width: 250px;
  background: #232323;
  border-radius: 30px;
  transform: perspective(250px) scaleX(1.1) rotateY(-10deg);
}
.container .spot_light:after {
  content: "";
  position: absolute;
  height: 40px;
  width: 40px;
  background: #000;
  border-radius: 50%;
  left: 20%;
  top: calc(50% - 20px);
}
.container .handle {
  position: absolute;
  height: 125px;
  width: 100px;
  border: 20px solid #000;
  border-radius: 12px;
  border-bottom: 0px;
  border-right: 0px;
  margin-top: -15%;
  margin-left: 6.5%;
  box-sizing: border-box;
}
.container .handle:after {
  content: "";
  position: absolute;
  right: 0px;
  top: 0px;
  width: 20px;
  height: 35px;
  background: #000;
}
.container .handle:before {
  content: "";
  position: absolute;
  height: 400px;
  width: 15px;
  bottom: 100%;
  background: #000;
  left: calc(50% - 15px);
  box-sizing: border-box;
}
.container .light_cover {
  posit.........完整代码请登录后点击上方下载按钮下载查看

网友评论0