Hasli4

Untitled

Nov 15th, 2026
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. @import url('https://fonts.googleapis.com/css2?family=Montserrat&family=Press+Start+2P&display=swap');
  2.  
  3. body {
  4. margin: 0;
  5. padding: 0;
  6. overflow: hidden;
  7. font-family: 'Montserrat', sans-serif;
  8. }
  9.  
  10. a {
  11. color: red;
  12. }
  13.  
  14. /* Игровое поле */
  15. .container {
  16. position: relative;
  17. width: 100%;
  18. height: 100vh;
  19. height: 100dvh;
  20.  
  21. background-image: url(https://hasli4.github.io/img_web/mario-bg.png);
  22.  
  23. /* Масштабируем фон по высоте экрана */
  24. background-size: auto 100%;
  25.  
  26. /* Повторяем фон по горизонтали */
  27. background-repeat: repeat-x;
  28.  
  29. /* Прижимаем фон к нижнему краю */
  30. background-position: left bottom;
  31. }
  32.  
  33. /* Контейнер Марио */
  34. .mario-container {
  35. position: absolute;
  36. inset: 0;
  37. }
  38.  
  39. /* Сам Марио */
  40. .mario {
  41. width: 80px;
  42. position: absolute;
  43.  
  44. /* Начальная позиция по горизонтали */
  45. left: 8%;
  46.  
  47. /* Расстояние от нижнего края экрана */
  48. bottom: 9.5%;
  49. }
  50.  
  51. .mario img {
  52. width: 100%;
  53. display: block;
  54. }
  55.  
  56. /* Счётчик */
  57. .points {
  58. font-family: 'Press Start 2P', cursive;
  59. position: absolute;
  60. top: 50px;
  61. left: 50px;
  62. font-size: 3em;
  63. color: white;
  64. }
Advertisement
Add Comment
Please, Sign In to add comment