网络层
This commit is contained in:
80
Client/web/style.css
Normal file
80
Client/web/style.css
Normal file
@@ -0,0 +1,80 @@
|
||||
/* 重置默认边距 */
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user