three打造一个聚光灯下的三维画展展厅动态效果代码

代码语言:html

所属分类:三维

代码描述:three打造一个聚光灯下的三维画展展厅动态效果代码,点击按钮可实现开灯关灯不同效果

代码标签: 聚光灯 三维 画展 展厅 动态 效果

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


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

<head>

  <meta charset="UTF-8">
  

<link href="https://fonts.googleapis.com/css2?family=Rajdhani&display=swap" rel="stylesheet">
  
  
  
<style>
body {
    height: 100vh;
    width: 100%;
    margin: 0;
    overflow: hidden;
    background-color: #79838b;
    display: flex;
    flex-flow: column;
    position: relative;
}

.bg {
    position: relative;
    width: 100%;
    height: 100vh;
    max-height: 500px;
    background-image: url("//repo.bfw.wiki/bfwrepo/image/5f88dabb9e9a2.png");
    background-size: contain;
    background-repeat: repeat-x;
    background-position: 50% 50%;
}

.pngLights {
    position: absolute;
    z-index: 8;
    width: 100%;
    height: 100vh;
    max-height: 500px;
    background-image: url("//repo.bfw.wiki/bfwrepo/image/5f88dacb2c662.png"), url("//repo.bfw.wiki/bfwrepo/image/5f88daa17dbde.png"), url("//repo.bfw.wiki/bfwrepo/image/5f88daa17dbde.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: 50% -22px;
}

.pngLights.active {
    background-image: url("//repo.bfw.wiki/bfwrepo/image/5f88dacb2c662.png"), url("//repo.bfw.wiki/bfwrepo/image/5f88daa17dbde.png"), url("");
}

.cc {
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
}

#canvas_container1 {
    max-height: 500px;
    z-index: 1;
}

#canvas_container2 {
    height: 100vh;
    z-index: 2;
}

.floor {
    flex: 1 1 auto;
    background-image: url("//repo.bfw.wiki/bfwrepo/image/5f88da81bd562.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 50% 0%;
}


/****   Buttons   *****/
.buttons {
    position: absolute;
    width: 100%;
    height: 100vh;
    max-height: 500px;
}

.btn {
    position: absolute;
    bottom: 5%;
    z-index: 10;
    border: 1px solid white;
    border-radius: 5px;
    padding: 3px 15px;
    background-color: #1f1f1f;
    color: #fdfcfc;
    -webkit-font-smoothing: antialiased;
    font-size: 18px;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 1px;
    curso.........完整代码请登录后点击上方下载按钮下载查看

网友评论0