Advertisement
Hadi1989

Untitled

May 18th, 2020
1,137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.23 KB | None | 0 0
  1. html, body {
  2.     font-family: 'Roboto';
  3.     height: 100%;
  4.     padding: 0;
  5.     margin: 0;
  6.   }
  7.    
  8.   body {
  9.     background: linear-gradient(90deg, #0099FF 0%, #6610f2 100%);
  10.     display: flex;
  11.     align-items: center;
  12.     justify-content: center;
  13.     flex-direction: column;
  14.     color: #fff;
  15.     font-size: 25px;
  16.     text-shadow: 2px 2px 2px rgb(0, 0, 0, 0.6);
  17.     font-weight: 700;
  18.   }
  19.    
  20.   .container {
  21.     width: 200px;
  22.     height: 200px;
  23.     perspective: 600px;
  24.   }
  25.    
  26.   .cube {
  27.     position: relative;
  28.     width: 200px;
  29.     height: 200px;
  30.     transform-style: preserve-3d;
  31.     transition: transform 1s;
  32.     cursor: pointer;
  33.   }
  34.    
  35.   .cube:hover {
  36.     transform: rotateY(-180deg);
  37.   }
  38.    
  39.   .cube-side {
  40.     display: flex;
  41.     align-items: center;
  42.     justify-content: center;
  43.     width: 200px;
  44.     height: 200px;
  45.     position: absolute;
  46.     box-shadow: 0px 0px 15px 0px rgba(0,0,0,0.25);
  47.   }
  48.    
  49.   .front {
  50.     transform: translate3d(0, 0, 100px);
  51.     background: #ffbe00;
  52.   }
  53.    
  54.   .back {
  55.     transform: rotateY(180deg) translate3d(0, 0, 100px);
  56.     background: #ffbe00;
  57.     color: #fff;
  58.   }
  59.    
  60.   .right {
  61.     background: #FFD773;
  62.     transform: rotateY(90deg) translate3d(0, 0, 100px);
  63.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement