Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @import url('https://fonts.googleapis.com/css2?family=Montserrat&family=Press+Start+2P&display=swap');
- body {
- margin: 0;
- padding: 0;
- overflow: hidden;
- font-family: 'Montserrat', sans-serif;
- }
- a {
- color: red;
- }
- /* Игровое поле */
- .container {
- position: relative;
- width: 100%;
- height: 100vh;
- height: 100dvh;
- background-image: url(https://hasli4.github.io/img_web/mario-bg.png);
- /* Масштабируем фон по высоте экрана */
- background-size: auto 100%;
- /* Повторяем фон по горизонтали */
- background-repeat: repeat-x;
- /* Прижимаем фон к нижнему краю */
- background-position: left bottom;
- }
- /* Контейнер Марио */
- .mario-container {
- position: absolute;
- inset: 0;
- }
- /* Сам Марио */
- .mario {
- width: 80px;
- position: absolute;
- /* Начальная позиция по горизонтали */
- left: 8%;
- /* Расстояние от нижнего края экрана */
- bottom: 9.5%;
- }
- .mario img {
- width: 100%;
- display: block;
- }
- /* Счётчик */
- .points {
- font-family: 'Press Start 2P', cursive;
- position: absolute;
- top: 50px;
- left: 50px;
- font-size: 3em;
- color: white;
- }
Advertisement
Add Comment
Please, Sign In to add comment