页面太丑了,美化一下页面
- User
页面太丑了,美化一下页面
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
页面太丑了,美化一下页面
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
好的,我们来美化一下页面,让它看起来更现代、更吸引人。
主要改进方向:
下面是修改后的 style.css 文件:
body {
font-family: 'Arial', sans-serif;
display: flex;
flex-direction: column;
align-items: center;
background-color: #f4f4f4;
margin: 0;
padding: 20px;
color: #333;
}
h1 {
color: #2c3e50;
margin-bottom: 20px;
text-align: center;
}
.container {
display: flex;
gap: 30px;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
max-width: 1200px; /* 限制最大宽度 */
width: 100%;
}
.controls {
display: flex;
flex-direction: column;
gap: 15px;
width: 300px; /* 固定控制面板宽度 */
padding-right: 20px;
border-right: 1px solid #eee;
}
.param-group {
display: flex;
flex-direction: column;
gap: 5px;
}
.param-group label {
font-weight: bold;
color: #555;
font-size: 0.9em;
}
.param-group input[type="number"],
.param-group input[type="range"] {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 0.9em;
color: #444;
}
.param-group input[type="range"] + span {
font-size: 0.85em;
color: #777;
text-align: right;
margin-top: 5px;
}
button {
padding: 10px 15px;
background-color: #3498db;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 1em;
transition: background-color 0.2s ease;
margin-top: 10px;
}
button:hover {
background-color: #2980b9;
}
button:active {
background-color: #1f618d;
}
button:disabled {
background-color: #cccccc;
cursor: not-allowed;
}
.info {
margin-top: 15px;
padding: 10px;
background-color: #ecf0f1;
border: 1px solid #d0d0d0;
border-radius: 4px;
font-size: 0.9em;
}
.info p {
margin: 5px 0;
color: #555;
}
#acoCanvas {
background-color: #eee;
border: 1px solid #ccc;
display: block;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}
.legend {
margin-top: 15px;
font-weight: bold;
color: #555;
margin-bottom: 5px;
}
.legend-item {
display: flex;
align-items: center;
margin-bottom: 5px;
font-size: 0.9em;
color: #666;
}
.color-box {
width: 15px;
height: 15px;
border: 1px solid #aaa;
margin-right: 8px;
border-radius: 3px;
}
/* 响应式设计 */
@media (max-width: 768px) {
.container {
flex-direction: column;
}
.controls {
width: 100%;
padding-right: 0;
border-right: none;
}
}
主要修改说明:
Arial 字体,更易于阅读。建议:
将修改后的 style.css 文件保存到你的项目中,然后刷新浏览器,你将看到一个更美观的蚂蚁寻食模拟页面。