style: styling game.css

This commit is contained in:
Matthew Florentino 2025-11-25 15:57:43 +07:00
parent 0ec677058e
commit 5e713e2c4d
5 changed files with 98 additions and 7 deletions

View File

@ -1,9 +1,9 @@
.container-third .bg{ .container-third .bg {
width: 100%; width: 100%;
height: 100dvh; height: 100dvh;
} }
.container-third .bg{ .container-third .bg {
position: relative; position: relative;
} }
@ -17,7 +17,7 @@
display: none; display: none;
} }
.container-third .bg img{ .container-third .bg img {
width: 100%; width: 100%;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
@ -26,7 +26,7 @@
background-size: cover; background-size: cover;
} }
.container-third .hero img{ .container-third .hero img {
width: 150px; width: 150px;
position: absolute; position: absolute;
bottom: 100px; bottom: 100px;
@ -36,7 +36,7 @@
background-size: cover; background-size: cover;
} }
.container-third .boss img{ .container-third .boss img {
width: 300px; width: 300px;
position: absolute; position: absolute;
bottom: 100px; bottom: 100px;
@ -44,4 +44,77 @@
image-rendering: pixelated; image-rendering: pixelated;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
}
.container-first .content .boss {
width: 100%;
height: 100dvh;
position: relative;
animation: beat 2s infinite;
transform-origin: center;
}
.container-first .content .boss img {
width: 500px;
position: absolute;
bottom: 140px;
left: 50%;
transform: translateX(-50%);
image-rendering: pixelated;
background-repeat: no-repeat;
background-size: cover;
}
.container-first .content .text {
width: 1000px;
height: 200px;
bottom: 40px;
left: 50%;
transform: translateX(-50%);
background-color: #101010f5;
position: absolute;
display: flex;
justify-content: start;
text-align: center;
align-content: center;
padding: 10px;
display: flex;
flex-direction: column;
border-radius: 10px;
border: 1px solid white;
z-index: 1;
}
.container-first .content .text p {
margin-bottom: 30px;
padding: 20px;
color: #ffdf12;
font-size: 50px;
}
.container-first .content .text .opt {
color: #ffdf12;
display: flex;
justify-content: center;
}
.container-first .content .text .opt p {
padding: 20px;
color: #ffdf12;
font-size: 30px;
}
@keyframes beat {
0% {
transform: scale(1);
}
50% {
transform: scale(0.95);
}
100% {
transform: scale(1);
}
} }

View File

@ -4,8 +4,26 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>firstperson</title> <title>firstperson</title>
<link rel="stylesheet" href="/src/css/global.css">
<link rel="stylesheet" href="/src/css/game.css">
</head> </head>
<body> <body>
<h1></h1> <div class="container-first">
<div class="content">
<div class="boss">
<img id="boss" src="/src/assets/Design/for-NewPythonGift.gif" alt="">
</div>
<div class="text">
<p>selamat datang di python games</p>
<div class="opt">
<p>a. panteks</p>
<p>b. anjas</p>
<p>c. hell nah</p>
<p>d. my kisah</p>
</div>
</div>
</div>
</div>
<script src="/src/js/firstperson.js"></script>
</body> </body>
</html> </html>

View File

@ -23,6 +23,6 @@
</div> </div>
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script> <script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script>AOS.init();</script> <script>AOS.init();</script>
<script src="/src/js/game.js"></script> <script src="/src/js/thirdperson.js"></script>
</body> </body>
</html> </html>

0
src/js/firstperson.js Normal file
View File