teste casa

In this example below you will see how to do a teste casa with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by bboyguil, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright bboyguil ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>teste casa</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div class="piso">
  <div class="wall left">left</div>
  <div class="wall right">right</div>
  <div class="wall back">back</div>
  <div class="wall front">front</div>
</div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/bboyguil/teste-casa-zPqzWX */
*{
  box-sizing: border-box;
  margin: 0;
  padding:0;
}
body{
  
}
.piso{
  margin: 150px auto;
//  display:flex;
//  justify-content: center;
//  align-items:center;
  width: 500px;
  height: 350px;
  background: red;
  padding: 10px;
  border: 2px solid #000;
  position: relative;
  transform-style:preserve-3d;
  perspective: 1000px;
  transform: rotateX(0deg) rotateY(0deg) rotate(0deg);
}
.wall{
  height: 200px;
  width: 480px;
  background: #ccc;
  position: absolute;
  outline: 1px solid #fff;
  border: 2px solid #000;
  transform-style:preserve-3d;
  transform-origin: 100%;
}
.back, .front{
  width:200px;
  height: 330px;
}
.back{background: green;}
.front{background: blue;}
.right{background: orange;}
.left{background: purple;}

.front{
  transform-origin: right;
  transform: rotateY(90deg);
  margin-left:0;
}
.back{
  transform-origin: left;
  transform: rotateY(-90deg);
  margin-left:0;
}
.right{
  transform-origin: top;
  transform: rotateX(90deg);
  margin-left:0;
}
.left{
  transform-origin: bottom;
  transform: rotateX(-90deg);
  margin-left:0;
}

Comments