Game for OLC Code Jam 2022
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

style.css 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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: red;
  38. animation-iteration-count: 10;
  39. animation-duration: 200ms;
  40. }
  41. .bullet {
  42. background: yellow;
  43. width: 1px !important;
  44. }
  45. .raindrop {
  46. background: cyan;
  47. width: 1px !important;
  48. }
  49. .result {
  50. left: 50%;
  51. top: 50%;
  52. font-size: 108px;
  53. }
  54. .result:after {
  55. content: 'Press any key to continue';
  56. position: absolute;
  57. font-size: 48px;
  58. width: fit-content;
  59. top: 85%;
  60. left: 50%;
  61. transform: translate(-50%);
  62. }
  63. #lives {
  64. position: absolute;
  65. top: 15px;
  66. left: 15px;
  67. font-size: 32px;
  68. }
  69. #lives:before {
  70. content: '❤ ';
  71. color: red;
  72. }
  73. @keyframes cloud {
  74. from {
  75. transform: translate(-50%) scale(1.2);
  76. opacity: 0.7;
  77. }
  78. to {
  79. transform: translate(-50%) scale(0.2);
  80. opacity: 0.1;
  81. }
  82. }
  83. @keyframes blink {
  84. 0% {
  85. opacity: 1;
  86. }
  87. 1% {
  88. opacity: 0;
  89. }
  90. 50% {
  91. opacity: 0;
  92. }
  93. 51% {
  94. opacity: 1;
  95. }
  96. 100% {
  97. opacity: 1;
  98. }
  99. }