3D helpers

In this example below you will see how to do a 3D helpers with some HTML / CSS and Javascript

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

<head>
  <meta charset="UTF-8">
  <title>3D helpers</title>
  
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">

  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/wontem/3d-helpers-GJMapV */
html, body {
  font-size: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.center {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.view {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.plane {
  width: 0;
  height: 0;
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d;
}

@-webkit-keyframes main-rotation {
  0% {
    -webkit-transform: rotateX(60deg) rotateZ(0deg);
            transform: rotateX(60deg) rotateZ(0deg);
  }
  100% {
    -webkit-transform: rotateX(60deg) rotateZ(360deg);
            transform: rotateX(60deg) rotateZ(360deg);
  }
}

@keyframes main-rotation {
  0% {
    -webkit-transform: rotateX(60deg) rotateZ(0deg);
            transform: rotateX(60deg) rotateZ(0deg);
  }
  100% {
    -webkit-transform: rotateX(60deg) rotateZ(360deg);
            transform: rotateX(60deg) rotateZ(360deg);
  }
}

Comments