zed_com

rock paper css game

Jun 27th, 2020
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.40 KB | None | 0 0
  1. * {
  2.   margin: 0;
  3.   padding: 0;
  4.   box-sizing: border-box;
  5. }
  6.  
  7. section {
  8.   height: 100vh;
  9.   background-color: rgb(39, 41, 68);
  10.   font-family: sans-serif;
  11. }
  12.  
  13. .score {
  14.   color: rgb(224, 224, 224);
  15.   height: 20vh;
  16.   display: flex;
  17.   justify-content: space-around;
  18.   align-items: center;
  19. }
  20. .score h2 {
  21.   font-size: 30px;
  22. }
  23. .score p {
  24.   text-align: center;
  25.   padding: 10px;
  26.   font-size: 25px;
  27. }
  28.  
  29. .intro {
  30.   color: rgb(224, 224, 224);
  31.   height: 50vh;
  32.   display: flex;
  33.   flex-direction: column;
  34.   align-items: center;
  35.   justify-content: space-around;
  36.   transition: opacity 0.5s ease;
  37. }
  38.  
  39. .intro h1 {
  40.   font-size: 50px;
  41. }
  42. .intro button,
  43. .match button {
  44.   width: 150px;
  45.   height: 50px;
  46.   background: none;
  47.   border: none;
  48.   color: rgb(224, 224, 224);
  49.   font-size: 20px;
  50.   background: rgb(45, 117, 96);
  51.   border-radius: 3px;
  52.   cursor: pointer;
  53. }
  54.  
  55. .match {
  56.   position: absolute;
  57.   top: 50%;
  58.   left: 50%;
  59.   transform: translate(-50%, -50%);
  60.   transition: opacity 0.5s ease 0.5s;
  61. }
  62. .winner {
  63.   color: rgb(224, 224, 224);
  64.   text-align: center;
  65.   font-size: 50px;
  66. }
  67.  
  68. .hands,
  69. .options {
  70.   display: flex;
  71.   justify-content: space-around;
  72.   align-items: center;
  73. }
  74.  
  75. .player-hand {
  76.   transform: rotateY(180deg);
  77. }
  78.  
  79. div.fadeOut {
  80.   opacity: 0;
  81.   pointer-events: none;
  82. }
  83.  
  84. div.fadeIn {
  85.   opacity: 1;
  86.   pointer-events: all;
  87. }
  88.  
  89. @keyframes shakePlayer {
  90.   0% {
  91.     transform: rotateY(180deg) translateY(0px);
  92.   }
  93.   15% {
  94.     transform: rotateY(180deg) translateY(-50px);
  95.   }
  96.   25% {
  97.     transform: rotateY(180deg) translateY(0px);
  98.   }
  99.   35% {
  100.     transform: rotateY(180deg) translateY(-50px);
  101.   }
  102.   50% {
  103.     transform: rotateY(180deg) translateY(0px);
  104.   }
  105.   65% {
  106.     transform: rotateY(180deg) translateY(-50px);
  107.   }
  108.   75% {
  109.     transform: rotateY(180deg) translateY(0px);
  110.   }
  111.   85% {
  112.     transform: rotateY(180deg) translateY(-50px);
  113.   }
  114.   100% {
  115.     transform: rotateY(180deg) translateY(0px);
  116.   }
  117. }
  118.  
  119. @keyframes shakeComputer {
  120.   0% {
  121.     transform: translateY(0px);
  122.   }
  123.   15% {
  124.     transform: translateY(-50px);
  125.   }
  126.   25% {
  127.     transform: translateY(0px);
  128.   }
  129.   35% {
  130.     transform: translateY(-50px);
  131.   }
  132.   50% {
  133.     transform: translateY(0px);
  134.   }
  135.   65% {
  136.     transform: translateY(-50px);
  137.   }
  138.   75% {
  139.     transform: translateY(0px);
  140.   }
  141.   85% {
  142.     transform: translateY(-50px);
  143.   }
  144.   100% {
  145.     transform: translateY(0px);
  146.   }
  147. }
Add Comment
Please, Sign In to add comment