Guest User

Untitled

a guest
Sep 29th, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.06 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.    <head>
  4.       <style>
  5.          body{
  6.             font-family: "Helvetica";
  7.             color: white;
  8.             background: red;
  9.             background: linear-gradient(to bottom right, hsl(150, 60%, 50%) 10%, hsl(180, 100%, 50%) 90%) no-repeat;
  10.             background-size: 100%;
  11.             margin: 0;
  12.             padding: 20px;
  13.             padding-bottom: 100%;
  14.          }
  15.  
  16.          h1, p{
  17.             text-align: center;
  18.          }
  19.          div{
  20.             margin-left: auto;
  21.             margin-right: auto;
  22.          }
  23.  
  24.          .triangle{
  25.             width: 0;
  26.             height: 0;
  27.             border-top: 0px solid transparent;
  28.             border-left:   50px solid transparent;
  29.             border-right:  50px solid transparent;
  30.             border-bottom: 70px solid black;
  31.          }
  32.          .container{
  33.             width: 210px;
  34.             height: 140px;
  35.             position: relative;
  36.             perspective: 1000;
  37.          }
  38.  
  39.          #pyramid{
  40.             opacity: 50%;
  41.             width: 100%;
  42.             height: 100%;
  43.             position: absolute;
  44.             transform-style: preserve-3d;
  45.             transform: translateZ( -100px );
  46.             animation: spinPyramid 3s infinite linear;
  47.          }
  48.  
  49.          #pyramid figure{
  50.             display: block;
  51.             position: absolute;
  52.             backface-visibility: none;
  53.          }
  54.          #pyramid figure.base{
  55.             backface-visibility: 100%;
  56.             background-color: lightgrey;
  57.             transform: rotateX(90deg) translateZ(-10px);
  58.             width: 100px;
  59.             height: 100px;
  60.          }
  61.          #pyramid figure:nth-child(1){
  62.             transform: rotateY(0deg) translateZ(25px) rotateX(45deg);
  63.             border-bottom-color: red;
  64.          }
  65.          #pyramid figure:nth-child(2){
  66.             transform: rotateY(90deg) translateZ(25px) rotateX(45deg);
  67.             border-bottom-color: green;
  68.          }
  69.          #pyramid figure:nth-child(3){
  70.             transform: rotateY(180deg) translateZ(25px) rotateX(45deg);
  71.             border-bottom-color: blue;
  72.          }
  73.          #pyramid figure:nth-child(4) {
  74.             transform: rotateY(-90deg) translateZ(25px) rotateX(45deg);
  75.          }
  76.  
  77.          @keyframes spinPyramid{
  78.             0%   {transform: translateZ(-100px)   rotateX(   0deg ) rotateY(   0deg );}
  79.             100% {transform: translateZ( -100px ) rotateX( 360deg ) rotateY( 360deg ); }
  80.          }
  81.  
  82.          #cia{
  83.             max-width: 100%;
  84.             max-height: 100%;
  85.          }
  86.       </style>
  87.  
  88.  
  89.    </head>
  90.    <body>
  91.       <h1>Pyramid Test</h1>
  92.       <div class="container">
  93.          <div id="pyramid">
  94.             <figure class="triangle"></figure>
  95.             <figure class="triangle"></figure>
  96.             <figure class="triangle"></figure>
  97.             <figure class="triangle"></figure>
  98.             <figure class="base"><img id="cia" src="http://logonoid.com/images/cia-logo.png" alt="CIA"></figure>
  99.          </div>
  100.       </div>
  101.       <p>Gotta go  fast!</p>
  102.    </body>
  103. </html>
Advertisement
Add Comment
Please, Sign In to add comment