Game for OLC Code Jam 2022
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

style.css 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. html, body {
  2. margin: 0;
  3. padding: 0;
  4. width: 100%;
  5. height: 100%;
  6. display: flex;
  7. justify-content: center;
  8. align-items: center;
  9. background: rgb(51, 51, 51);
  10. overflow: hidden;
  11. white-space: nowrap;
  12. color: white;
  13. font-family: arial;
  14. }
  15. #root {
  16. background: rgb(31, 31, 31);
  17. position: relative;
  18. margin: 0;
  19. padding: 0;
  20. width: 100%;
  21. max-height: 100%;
  22. aspect-ratio: 16/9;
  23. overflow: hidden;
  24. }
  25. #root div {
  26. transform: translate(-50%, -50%);
  27. position: absolute;
  28. }
  29. .cloud-particle {
  30. border-radius: 50%;
  31. background: rgb(255, 255, 255);
  32. animation-name: cloud;
  33. animation-iteration-count: infinite;
  34. animation-direction: alternate;
  35. }
  36. .shooting-pad {
  37. background: url('../img/shooting-pad.svg') no-repeat;
  38. background-size: 100%;
  39. animation-iteration-count: 10;
  40. animation-duration: 200ms;
  41. }
  42. .bullet {
  43. background: yellow;
  44. width: 1px !important;
  45. }
  46. .raindrop {
  47. background: cyan;
  48. width: 1px !important;
  49. }
  50. .result {
  51. left: 50%;
  52. top: 50%;
  53. font-size: 108px;
  54. }
  55. .result:after {
  56. content: 'Press any key to continue';
  57. position: absolute;
  58. font-size: 48px;
  59. width: fit-content;
  60. top: 85%;
  61. left: 50%;
  62. transform: translate(-50%);
  63. }
  64. #lives {
  65. position: absolute;
  66. top: 15px;
  67. left: 15px;
  68. font-size: 32px;
  69. }
  70. #lives:before {
  71. content: '❤ ';
  72. color: red;
  73. }
  74. @keyframes cloud {
  75. from {
  76. transform: translate(-50%) scale(1.2);
  77. opacity: 0.7;
  78. }
  79. to {
  80. transform: translate(-50%) scale(0.2);
  81. opacity: 0.1;
  82. }
  83. }
  84. @keyframes blink {
  85. 0% {
  86. opacity: 1;
  87. }
  88. 1% {
  89. opacity: 0;
  90. }
  91. 50% {
  92. opacity: 0;
  93. }
  94. 51% {
  95. opacity: 1;
  96. }
  97. 100% {
  98. opacity: 1;
  99. }
  100. }