feat: Styling game first and third person merge from game

This commit is contained in:
5803025047 2025-11-25 04:27:27 -05:00
commit 71e7f7a48e
6 changed files with 217 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,124 @@
.container-third .bg {
width: 100%;
height: 100dvh;
}
.container-third .bg {
position: relative;
}
.container-third .anm {
font-size: 100px;
background-size: cover;
position: absolute;
top: 100px;
text-align: center;
width: 100%;
display: none;
}
.container-third .bg img {
width: 100%;
position: absolute;
bottom: 0;
image-rendering: pixelated;
background-repeat: no-repeat;
background-size: cover;
}
.container-third .hero img {
width: 150px;
position: absolute;
bottom: 100px;
left: 50px;
image-rendering: pixelated;
background-repeat: no-repeat;
background-size: cover;
}
.container-third .boss img {
width: 300px;
position: absolute;
bottom: 100px;
right: 50px;
image-rendering: pixelated;
background-repeat: no-repeat;
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: 600px;
position: absolute;
bottom: 100px;
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: 10px 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: 10px;
color: #ffdf12;
font-size: 30px;
background-color: #f7e62e34;
margin: 5px;
border-radius: 10px;
cursor: pointer;
}
@keyframes beat {
0% {
transform: scale(1);
}
50% {
transform: scale(0.95);
}
100% {
transform: scale(1);
}
}

View File

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>firstperson</title>
<link rel="stylesheet" href="/src/css/global.css">
<link rel="stylesheet" href="/src/css/game.css">
</head>
<body>
<div class="container-first">
<div class="content">
<div class="boss">
<img id="boss" src="/src/assets/Design/PYTHON-BOSSFIGHTMODEFINALt.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>
</html>

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>thirdperson</title>
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<link rel="stylesheet" href="/src/css/global.css">
<link rel="stylesheet" href="/src/css/game.css">
</head>
<body>
<div class="container-third">
<h1 id="wellcome-message" class="anm" >PYTHON QUIZ GAME</h1>
<div class="bg">
<img src="/src/assets/Design/wayland.png" alt="bg">
</div>
<div class="hero">
<img id="hero" src="/src/assets/Design/KnightPixLE2-export.png" alt="">
</div>
<div class="boss">
<img id="boss" src="/src/assets/Design/for-python-Recovered-export2.png" alt="">
</div>
</div>
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script>AOS.init();</script>
<script src="/src/js/thirdperson.js"></script>
</body>
</html>

36
src/js/thirdperson.js Normal file
View File

@ -0,0 +1,36 @@
const txt = document.getElementById('wellcome-message');
const hero = document.getElementById('hero');
const boss = document.getElementById('boss');
boss.style.transition = '2s cubic-bezier(0.4, 0, 0.2, 1)';
hero.style.transition = '2s cubic-bezier(0.4, 0, 0.2, 1)';
txt.style.transition = 'opacity .6s cubic-bezier(0.4, 0, 0.2, 1)';
txt.style.opacity = '0';
txt.style.display = 'block';
setTimeout(() => {
txt.style.opacity = '1';
}, 1000);
setTimeout(() => {
txt.style.opacity = '0';
setTimeout(() => {
txt.style.display = 'none';
}, 400);
}, 5000);
setTimeout(() => {
hero.style.left = '800px';
}, 500);
setTimeout(() => {
boss.style.right = '700px';
}, 500);
setTimeout(()=> {
window.location.href = "/src/game/firstperson.html"
}, 7000)