奶娃的小窝|随身陪伴
by ThunderStar55248 lines4.8 KB
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>奶娃的小窝|随身陪伴</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background-color: #f6f2ec;
font-family: system-ui, sans-serif;
overflow: hidden;
height: 100vh;
}
.container {
width: 100vw;
height: 100vh;
padding: 12px;
display: flex;
flex-direction: column;
}
.top-bar {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-bottom: 10px;
}
.res-item {
background: #fff;
border-radius: 14px;
padding: 8px 14px;
font-size: 15px;
}
.status-wrap {
display: flex;
justify-content: space-between;
gap: 8px;
margin-bottom: 10px;
}
.status-item {
flex: 1;
background: #fff;
padding: 8px;
border-radius: 12px;
}
.status-label {
font-size: 14px;
margin-bottom: 6px;
}
.bar-bg {
width: 100%;
height: 10px;
background: #e5e5e5;
border-radius: 6px;
overflow: hidden;
}
.bar-fill {
height: 100%;
border-radius: 6px;
transition: width 0.3s;
}
.hunger { background: #ffb380; }
.clean { background: #80c8ff; }
.mood { background: #ffd266; }
.tip-text {
text-align: center;
font-size: 16px;
color: #555;
margin-bottom: 12px;
}
.room {
flex: 1;
background: #e9e6df;
border-radius: 18px;
position: relative;
overflow: hidden;
min-height: 260px;
}
.window {
width: 110px;
height: 100px;
border: 8px solid #bcb8ad;
position: absolute;
right: 20px;
top: 20px;
background: #b8e0b8;
}
.window::before,
.window::after {
content: "";
position: absolute;
background: #bcb8ad;
}
.window::before {
width: 100%;
height: 4px;
top: 50%;
}
.window::after {
width: 4px;
height: 100%;
left: 50%;
}
.desk {
width: 90px;
height: 55px;
background: #d9c8b4;
position: absolute;
left: 10px;
bottom: 20px;
border-radius: 4px;
}
.chair {
width: 100px;
height: 130px;
background: #c5e0dc;
position: absolute;
right: 10px;
bottom: 20px;
border-radius: 10px;
}
.rug {
width: 200px;
height: 110px;
background: #d7e2d5;
border-radius: 50%;
position: absolute;
left: 50%;
bottom: 10px;
transform: translateX(-50%);
}
.frog {
width: 130px;
height: 180px;
position: absolute;
left: 50%;
bottom: 20px;
transform: translateX(-50%);
cursor: pointer;
}
.body-main {
width: 120px;
height: 140px;
background: #ffcc44;
border-radius: 45% 45% 40% 40%;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.belly {
width: 80px;
height: 100px;
background: #ffe9bc;
border-radius: 50%;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
}
.eye {
width: 22px;
height: 22px;
background: #222;
border-radius: 50%;
position: absolute;
top: 20px;
}
.eye.left { left: 28px; }
.eye.right { right: 28px; }
.arm {
width: 30px;
height: 55px;
background: #e6b838;
border-radius: 30px;
position: absolute;
top: 60px;
}
.arm.left { left: -6px; transform: rotate(-12deg); }
.arm.right { right: -6px; transform: rotate(12deg); }
.leg {
width: 32px;
height: 45px;
background: #e6b838;
border-radius: 20px;
position: absolute;
bottom: -30px;
}
.leg.left { left: 30px; }
.leg.right { right: 30px; }
.side-btn {
position: absolute;
right: 10px;
top: 140px;
display: flex;
flex-direction: column;
gap: 8px;
}
.side-btn > div {
width: 56px;
height: 56px;
background: #fff;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
}
.action-bar {
margin-top: 12px;
display: flex;
justify-content: center;
gap: 14px;
}
.action-btn {
padding: 12px 22px;
border: none;
border-radius: 30px;
background: #ffbc42;
font-size: 16px;
color: #222;
cursor: pointer;
}
.msg-popup {
position: fixed;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(0,0,0,0.65);
color: white;
padding: 14px 24px;
border-radius: 12px;
font-size: 17px;
display: none;
z-index: 999;
}
</style>
</head>
<body>
<div class="container">
<div class="top-bar">
<div class="res-item">🍪饼干 <span id="cookieNum">40</span></div>
<div class="res-item">💎星砂 <span id="starNum">0</span></div>
</div>
<div class="status-wrap">
<div class="status-item">
<div class="status-label">🍎饱食 <span id="hungerVal">65</span></div>
Game Source: 奶娃的小窝|随身陪伴
Creator: ThunderStar55
Libraries: none
Complexity: complex (248 lines, 4.8 KB)
The full source code is displayed above on this page.
Remix Instructions
To remix this game, copy the source code above and modify it. Add a ARCADELAB header at the top with "remix_of: game-thunderstar55" to link back to the original. Then publish at arcadelab.ai/publish.