StuffBySpencer

Superpowers Custom Loading Screen - CSS

Dec 8th, 2016
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.71 KB | None | 0 0
  1. @font-face {
  2.  
  3.    font-family: 'SpencersFont';
  4.    src: url( 'SpencersFont.ttf' );
  5.  
  6. }
  7.  
  8. * {
  9.    
  10.     min-width: 0;
  11.     min-height: 0;
  12.  
  13. }
  14.  
  15. html, body {
  16.    
  17.     height: 100%;
  18.  
  19. }
  20.  
  21. body {
  22.    
  23.     margin: 0;
  24.    
  25.     display: flex;
  26.    
  27.     background: #000;
  28.    
  29.     user-select: none;
  30.     -webkit-user-select: none;
  31.     -moz-user-select: none;
  32.    
  33.     overflow: hidden;
  34.  
  35. }
  36.  
  37. canvas{
  38.    
  39.     flex: 1;
  40.    
  41.     outline: none;
  42.  
  43. }
  44.  
  45. h1 {
  46.  
  47.     display: inline-block;
  48.  
  49. }
  50.  
  51. #loading {
  52.    
  53.     top: 0;
  54.     bottom: 0;
  55.     left: 0;
  56.     right: 0;
  57.     position: absolute;
  58.    
  59.     color: #efefef;
  60.     font-size: 24px;
  61.     font-family: sans-serif;
  62.     text-transform: uppercase;
  63.    
  64.     display: flex;
  65.     flex-flow: column;
  66.    
  67.     align-items: center;
  68.     justify-content: center;
  69.    
  70.     /*background: springgreen;*/
  71.  
  72. }
  73. #loading img {
  74.    
  75.     width: 100%;
  76.     height: 100%;
  77.    
  78.     image-rendering: pixelated;
  79.  
  80. }
  81. #loading progress {
  82.    
  83.     background: white;
  84.    
  85.     border: none;
  86.    
  87.     width: 50%;
  88.     height: 10px;
  89.  
  90.     top: 44%;
  91.     bottom: 0;
  92.     left: 0;
  93.     right: 0;
  94.     margin: auto;
  95.     position: absolute;
  96.  
  97. }
  98. #loading progress::-webkit-progress-bar {
  99.    
  100.     background: white;
  101.  
  102. }
  103. #loading progress::-webkit-progress-value {
  104.    
  105.     background-color: gray;
  106.  
  107. }
  108. #loading progress::-moz-progress-bar {
  109.    
  110.     background-color: gray;
  111.  
  112. }
  113. #loading .error{
  114.    
  115.     text-align: center;
  116.    
  117.     padding: 0 2em;
  118.  
  119. }
  120.  
  121. @keyframes loadingLetter {
  122.  
  123.      0% { transform: translate( 0px,   0px ); opacity: 1; }
  124.     15% { transform: translate( 0px, -25px ); opacity: 0.36; }
  125.     25% { transform: translate( 0px,   0px ); opacity: 1; }
  126.  
  127. }
  128. #loadingText {
  129.  
  130.     width: 50%;
  131.     height: 25%;
  132.  
  133.     top: 0;
  134.     bottom: 0;
  135.     left: 0;
  136.     right: 0;
  137.     margin: auto;
  138.     position: absolute;
  139.  
  140.     text-align: center;
  141.     vertical-align: middle;
  142.  
  143.     font-family: 'SpencersFont';
  144.     font-size: 1.23em;
  145.     font-weight: normal;
  146.  
  147.     -webkit-transform: translateZ(0);
  148.  
  149. }
  150. #L {
  151.     animation-name: loadingLetter;
  152.     animation-duration: 3s;
  153.     animation-iteration-count: infinite;
  154.     animation-delay: 0s;
  155. }
  156. #O {
  157.     animation-name: loadingLetter;
  158.     animation-duration: 3s;
  159.     animation-iteration-count: infinite;
  160.     animation-delay: 0.35s;
  161. }
  162. #A {
  163.     animation-name: loadingLetter;
  164.     animation-duration: 3s;
  165.     animation-iteration-count: infinite;
  166.     animation-delay: 0.7s;
  167. }
  168. #D {
  169.     animation-name: loadingLetter;
  170.     animation-duration: 3s;
  171.     animation-iteration-count: infinite;
  172.     animation-delay: 1.05s;
  173. }
  174. #I {
  175.     animation-name: loadingLetter;
  176.     animation-duration: 3s;
  177.     animation-iteration-count: infinite;
  178.     animation-delay: 1.4s;
  179. }
  180. #N {
  181.     animation-name: loadingLetter;
  182.     animation-duration: 3s;
  183.     animation-iteration-count: infinite;
  184.     animation-delay: 1.75s;
  185. }
  186. #G {
  187.     animation-name: loadingLetter;
  188.     animation-duration: 3s;
  189.     animation-iteration-count: infinite;
  190.     animation-delay: 2.1s;
  191. }
Add Comment
Please, Sign In to add comment