style.css 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. * {
  2. margin: 0;
  3. padding: 0;
  4. }
  5. html,
  6. body {
  7. height: 100%;
  8. }
  9. body {
  10. font-family: Arial, Helvetica, sans-serif;
  11. background-color: rgb(58, 129, 0);
  12. color: #fff;
  13. display: flex;
  14. flex-direction: column;
  15. justify-content: center;
  16. align-items: center;
  17. overflow: hidden;
  18. cursor: none;
  19. }
  20. .score {
  21. font-size: 4em;
  22. margin-bottom: 0.5em;
  23. }
  24. .board {
  25. height: 600px;
  26. width: 600px;
  27. display: grid;
  28. grid-template-columns: repeat(3, 1fr);
  29. grid-template-rows: repeat(3, 1fr);
  30. gap: 80px;
  31. }
  32. .hole {
  33. background-color: rgb(165, 85, 11);
  34. border-radius: 50%;
  35. box-shadow: inset 0 10px 0 7px rgb(53, 21, 6), inset 0 20px 20px 15px rgba(0, 0, 0, 0.3),
  36. 0 0 5px rgba(0, 0, 0, 0.5);
  37. position: relative;
  38. overflow: hidden;
  39. }
  40. .hole .mole {
  41. width: 70%;
  42. position: absolute;
  43. left: 50%;
  44. transform: translateX(-50%);
  45. bottom: 0;
  46. animation: rise 0.3s ease-out;
  47. }
  48. @keyframes rise {
  49. 0% {
  50. transform: translateX(-50%) translateY(100%);
  51. }
  52. 100% {
  53. transform: translateX(-50%) translateY(0);
  54. }
  55. }
  56. .cursor {
  57. height: 110px;
  58. width: 100px;
  59. position: absolute;
  60. top: 100px;
  61. left: 100px;
  62. background-image: url('../img/hammer.png');
  63. background-size: 100% 100%;
  64. transform: translate(-20%, -20%);
  65. transition: transform 0.1s;
  66. pointer-events: none;
  67. }
  68. .cursor.active {
  69. transform: translate(-20%, -20%) rotate(-45deg);
  70. }