Game for OLC Code Jam 2022
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

style.css 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. }
  13. #root {
  14. background: rgb(31, 31, 31);
  15. position: relative;
  16. margin: 0;
  17. padding: 0;
  18. width: 100%;
  19. max-height: 100%;
  20. aspect-ratio: 16/9;
  21. overflow: hidden;
  22. }
  23. #root div {
  24. transform: translate(-50%, -50%);
  25. position: absolute;
  26. }
  27. .cloud-particle {
  28. border-radius: 50%;
  29. background: rgb(255, 255, 255);
  30. animation-name: cloud;
  31. animation-iteration-count: infinite;
  32. animation-direction: alternate;
  33. }
  34. .shooting-pad {
  35. background: red;
  36. }
  37. .bullet {
  38. background: yellow;
  39. width: 1px !important;
  40. }
  41. .raindrop {
  42. background: cyan;
  43. width: 1px !important;
  44. }
  45. .result {
  46. left: 50%;
  47. top: 50%;
  48. font-size: 108px;
  49. font-family: arial;
  50. color: white;
  51. }
  52. .result:after {
  53. content: 'Press any key to restart';
  54. position: absolute;
  55. font-size: 48px;
  56. width: fit-content;
  57. top: 85%;
  58. left: 50%;
  59. transform: translate(-50%);
  60. }
  61. @keyframes cloud {
  62. from {
  63. transform: translate(-50%) scale(1.2);
  64. opacity: 0.7;
  65. }
  66. to {
  67. transform: translate(-50%) scale(0.2);
  68. opacity: 0.1;
  69. }
  70. }