css实现3d电影院播放电影效果

代码语言:html

所属分类:布局界面

代码描述:css实现3d电影院播放电影效果

代码标签: 电影院 放电影 效果

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
/* Variables */
:root {
  --yl: #FAFDBA;
  --yd: #d5d799;
}

/* Mixin */
/* Reset */
*, *::after, *::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transform-style: preserve-3d;
}

/* Generic */
body {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: #FEFFF7;
  font-family: 'Baloo Thambi 2', cursive;
  transition: 2s;
}

video {
  opacity: 0;
  transition: 1s;
}

.main {
  width: 1025px;
  height: 600px;
  padding-top: 200px;
  position: relative;
}
@media (max-width: 800px) {
  .main {
    transform: scale(0.75);
  }
}
@media (max-width: 600px) {
  .main {
    transform: scale(0.5);
  }
}

.flex {
  display: flex;
  justify-content: center;
  align-items: center;
}

.face {
  position: absolute;
}

/*Base*/
/*=================================*/
/*=================================*/
.cine {
  position: relative;
  width: 400px;
  height: 700px;
  transform: perspective(4000px) rotateX(75deg) rotateZ(50deg);
  transition: 2s;
}
.cine::before {
  content: '';
  position: absolute;
  width: 160%;
  height: 101%;
  right: -8px;
  transform: translateZ(-20px);
  background-image: linear-gradient(to left, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0.05));
}

/* ---------- */
.floor {
  width: 400px;
  height: 700px;
  width: 400px;
  height: 700px;
}
.floor__front {
  width: 400px;
  height: 40px;
  transform: rotateX(-90deg) translateZ(350px);
}
.floor__back {
  width: 400px;
  height: 40px;
  transform: rotateX(90deg) translateZ(350px);
}
.floor__top {
  width: 400px;
  height: 700px;
  transform: rotateY(0deg) translateZ(20px);
}
.floor__bottom {
  width: 400px;
  height: 700px;
  transform: rotateY(180deg) translateZ(20px);
}
.floor__right {
  width: 40px;
  height: 700px;
  transform: rotateY(90deg) translateZ(200px);
}
.floor__left {
  width: 40px;
  height: 700px;
  transform: rotateY(90deg) translateZ(-200px);
}
.floor__front {
  background-image: linear-gradient(to bottom, #65586D 70%, #584d5f);
}
.floor__back {
  background-color: #65586D;
}
.floor__top {
  background-image: linear-gradient(to bottom, #32142a, #7E375C, #572349);
  box-shadow: inset 0 0 80px #551F55;
  display: flex;
  align-items: flex-end;
  padding: 50px 50px 25px 60px;
}
.floor__bottom {
  background-color: #65586D;
}
.floor__right {
  background-image: linear-gradient(to right, #827980 70%, #756d73);
}
.floor__left {
  background-color: #65586D;
}

/* ---------- */
.floor-a {
  width: 400px;
  height: 200px;
  width: 400px;
  height: 200px;
  position: absolute;
  top: 0;
  transform: translateZ(40px);
}
.floor-a__front {
  width: 400px;
  height: 50px;
  transform: rotateX(-90deg) translateZ(100px);
}
.floor-a__back {
  width: 400px;
  height: 50px;
  transform: rotateX(90deg) translateZ(100px);
}
.floor-a__top {
  width: 400px;
  height: 200px;
  transform: rotateY(0deg) translateZ(25px);
}
.floor-a__bottom {
  width: 400px;
  height: 200px;
  transform: rotateY(180deg) translateZ(25px);
}
.floor-a__right {
  width: 50px;
  height: 200px;
  transform: rotateY(90deg) translateZ(200px);
}
.floor-a__left {
  width: 50px;
  height: 200px;
  transform: rotateY(90deg) translateZ(-200px);
}
.floor-a__front {
  background-image: linear-gradient(to bottom, #65586D 70%, #584d5f);
}
.floor-a__back {
  background-color: #65586D;
}
.floor-a__top {
  overflow: hidden;
  background-image: radial-gradient(circle at 50% 50%, #949174, #9F9C82, #8e868d);
  box-shadow: inset 0 0 50px #65586D;
}
.floor-a__top::before {
  content: '';
  position: absolute;
  top: -150px;
  left: -105px;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to left, #65586D, rgba(101, 88, 109, 0.5), transparent);
  transform: rotateZ(-30deg);
}
.floor-a__top::after {
  content: '';
  position: absolute;
  left: 70px;
  width: 75%;
  height: 100%;
  transform: skewX(20deg);
  background-image: linear-gradient(to bottom, #8D867F, rgba(141, 134, 127, 0.25));
}
.floor-a__bottom {
  background-color: #65586D;
}
.floor-a__right {
  background-color: #827980;
}
.floor-a__left {
  background-color: #65586D;
}

.steps {
  width: 80px;
  height: 60px;
  position: absolute;
  top: 200px;
  left: 25px;
  transform: translateZ(20px);
}
.steps::before {
  content: '';
  position: absolute;
  width: 130%;
  height: 150%;
  background-image: linear-gradient(to bottom, #692A58 70%, rgba(105, 42, 88, 0.7));
}
.steps-b {
  left: calc(100% - 81px);
}
.steps-b::before {
  width: 115%;
  right: 0;
}

.step-a, .step-b, .step-c {
  width: 80px;
  height: 60px;
  width: 80px;
  height: 60px;
  position: absolute;
  top: 0;
  transform: translateZ(5px);
}
.step-a__front, .step-b__front, .step-c__front {
  width: 80px;
  height: 12px;
  transform: rotateX(-90deg) translateZ(30px);
}
.step-a__back, .step-b__back, .step-c__back {
  width: 80px;
  height: 12px;
  transform: rotateX(90deg) translateZ(30px);
}
.step-a__top, .step-b__top, .step-c__top {
  width: 80px;
  height: 60px;
  transform: rotateY(0deg) translateZ(6px);
}
.step-a__bottom, .step-b__bottom, .step-c__bottom {
  width: 80px;
  height: 60px;
  transform: rotateY(180deg) translateZ(6px);
}
.step-a__right, .step-b__right, .step-c__right {
  width: 12px;
  height: 60px;
  transform: rotateY(90deg) translateZ(40px);
}
.step-a__left, .step-b__left, .step-c__left {
  width: 12px;
  height: 60px;
  transform: rotateY(90deg) translateZ(-40px);
}
.step-a__front, .step-b__front, .step-c__front {
  background-image: linear-gradient(to bottom, #65586D 70%, #584d5f);
}
.step-a__back, .step-b__back, .step-c__back {
  background-color: #65586D;
}
.step-a__top, .step-b__top, .step-c__top {
  background-image: linear-gradient(to bottom, #551F55, #692A58 20%, #7E375C);
}
.step-a__bottom, .step-b__bottom, .step-c__bottom {
  background-color: #65586D;
}
.step-a__right, .step-b__right, .step-c__right {
  background-image: linear-gradient(to right, #827980 70%, #756d73);
}
.step-a__left, .step-b__left, .step-c__left {
  background-color: #65586D;
}
.step-b {
  transform: translateZ(15px) translateY(-20px);
}
.step-c {
  transform: translateZ(25px) translateY(-40px);
}

/* ---------- */
.wall-l {
  width: 25px;
  height: 700px;
  width: 25px;
  height: 700px;
  position: absolute;
  top: 0;
  transform: translateZ(120px);
}
.wall-l__front {
  width: 25px;
  height: 200px;
  transform: rotateX(-90deg) translateZ(350px);
}
.wall-l__back {
  width: 25px;
  height: 200px;
  transform: rotateX(90deg) translateZ(350px);
}
.wall-l__top {
  width: 25px;
  height: 700px;
  transform: rotateY(0deg) translateZ(100px);
}
.wall-l__bottom {
  width: 25px;
  height: 700px;
  transform: rotateY(180deg) translateZ(100px);
}
.wall-l__right {
  width: 200px;
  height: 700px;
  transform: rotateY(90deg) translateZ(12.5px);
}
.wall-l__left {
  width: 200px;
  height: 700px;
  transform: rotateY(90deg) translateZ(-12.5px);
}
.wall-l__front {
  background-color: #65586D;
}
.wall-l__back {
  background-color: #65586D;
}
.wall-l__top {
  background-image: linear-gradient(to bot.........完整代码请登录后点击上方下载按钮下载查看

网友评论0