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