1
0

style.css 1.2 KB

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