This repository has been archived on 2026-01-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Game/Client/web/style.css
2025-06-28 17:38:22 +08:00

80 lines
1.6 KiB
CSS

/* 重置默认边距 */
body, html {
margin: 0;
padding: 0;
height: 100%;
background-color: #f5f5f5;
}
/* 应用容器填满整个视口并居中 */
.app-container {
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
/* 重置body样式 */
body {
margin: 0;
padding: 0;
overflow: hidden;
}
/* 网格容器 - 固定2x2布局 */
.grid-container {
display: grid;
grid-template-columns: 400px 400px;
grid-template-rows: 400px 400px;
gap: 30px;
padding: 40px;
background-color: #e0e0e0;
min-height: 100vh;
width: 100vw;
box-sizing: border-box;
margin: 0 auto;
place-content: center;
}
/* 正方形样式 */
.square {
width: 400px;
height: 400px;
background-color: #ffffff;
background-image:
linear-gradient(to right, #ddd 1px, transparent 1px),
linear-gradient(to bottom, #ddd 1px, transparent 1px);
background-size: 20px 20px;
border: 5px solid #555;
border-radius: 15px;
position: relative;
box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
/* 连接状态圆点 */
.connection-dot {
position: absolute;
top: 15px;
right: 15px;
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #ff4444; /* 默认断开状态-红色 */
transition: background-color 0.3s;
}
.connection-dot.connected {
background-color: #44ff44; /* 连接状态-绿色 */
}
/* 游戏动态圆点 */
.game-dot {
position: absolute;
width: 10px;
height: 10px;
background-color: red;
border-radius: 50%;
transform: translate(-50%, -50%);
pointer-events: none;
}