style.css 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. body {
  2. margin: 0;
  3. padding: 0;
  4. font-family: Helvetica;
  5. height: 100vh;
  6. }
  7. #game-div {
  8. height: 24vw;
  9. width: 100%;
  10. position: relative;
  11. top: 48vh;
  12. transform: translateY(-50%);
  13. background: linear-gradient(0deg, rgb(232, 219, 146) 0%, rgb(237, 212, 138) 33%,rgb(38, 165, 255) 100%);
  14. }
  15. #ducko-div {
  16. width: 9vw;
  17. height: 12vw;
  18. position: absolute;
  19. left: 4vw;
  20. bottom: 0;
  21. background-image: url(player.gif);
  22. background-size: cover;
  23. }
  24. @keyframes jump {
  25. 0% { bottom: 0vw; }
  26. 50% { bottom: 12vw; }
  27. 100% { bottom: 0vw;}
  28. }
  29. .jumping {
  30. animation-name: jump;
  31. animation-duration: 1s;
  32. }
  33. .cactus {
  34. width: 4vw;
  35. height: 6vw;
  36. position: absolute;
  37. bottom: 1vw;
  38. background-image: url(cactus.png);
  39. background-size: cover;
  40. }
  41. #score-div {
  42. position: absolute;
  43. top: 1vw;
  44. right: 1vw;
  45. color: #fff;
  46. font-weight: bold;
  47. font-size: 2vw;
  48. font-family: Helvetica;
  49. }
  50. #text-div {
  51. position: absolute;
  52. top: 50%;
  53. left: 50%;
  54. transform: translate(-50%, -50%);
  55. color: #fff;
  56. font-weight: bold;
  57. font-size: 4vw;
  58. font-family: Helvetica;
  59. text-align: center;
  60. cursor: pointer;
  61. }
  62. footer {
  63. position: absolute;
  64. bottom: 0;
  65. width: 100%;
  66. text-align: center;
  67. font-family: Helvetica;
  68. font-weight: bold;
  69. font-size: 1vw;
  70. line-height: 0;
  71. }