| body { | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| height: 100vh; | |
| background-color: #f0f0f0; | |
| margin: 0; | |
| font-family: Arial, sans-serif; | |
| } | |
| #game-container { | |
| position: relative; | |
| width: 600px; | |
| height: 200px; | |
| border: 2px solid #000; | |
| background-color: #fff; | |
| overflow: hidden; | |
| } | |
| #dino { | |
| position: absolute; | |
| bottom: 0; | |
| width: 40px; | |
| height: 40px; | |
| background-color: #4caf50; | |
| border-radius: 10px; | |
| } | |
| #obstacle { | |
| position: absolute; | |
| bottom: 0; | |
| width: 20px; | |
| height: 40px; | |
| background-color: #e74c3c; | |
| border-radius: 5px; | |
| } | |
| #score { | |
| position: absolute; | |
| top: 10px; | |
| left: 10px; | |
| font-size: 24px; | |
| color: #333; | |
| } | |