216 lines
4.2 KiB
CSS
216 lines
4.2 KiB
CSS
/* 全局样式重置 */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* 根元素变量定义 */
|
|
:root {
|
|
--primary-color: #3498db;
|
|
--primary-hover: #2980b9;
|
|
--secondary-color: #2ecc71;
|
|
--secondary-hover: #27ae60;
|
|
--danger-color: #e74c3c;
|
|
--danger-hover: #c0392b;
|
|
--warning-color: #f39c12;
|
|
--warning-hover: #e67e22;
|
|
--background-color: #f5f7fa;
|
|
--card-background: #ffffff;
|
|
--text-primary: #2c3e50;
|
|
--text-secondary: #7f8c8d;
|
|
--border-radius: 8px;
|
|
--box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
--transition: all 0.3s ease;
|
|
}
|
|
|
|
/* 基础样式 */
|
|
body {
|
|
font-family: 'HarmonyOS Sans SC', sans-serif;
|
|
background-color: var(--background-color);
|
|
color: var(--text-primary);
|
|
line-height: 1.6;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
/* 主容器 */
|
|
.container {
|
|
width: 100%;
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
/* 标题样式 */
|
|
h1 {
|
|
text-align: center;
|
|
color: var(--text-primary);
|
|
margin-bottom: 30px;
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* 表单容器 */
|
|
.form-container {
|
|
background-color: var(--card-background);
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--box-shadow);
|
|
padding: 24px;
|
|
margin-bottom: 24px;
|
|
width: 100%;
|
|
}
|
|
|
|
/* 操作按钮区域 */
|
|
.actions {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
gap: 12px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
/* 按钮样式 */
|
|
button {
|
|
padding: 12px 16px;
|
|
border: none;
|
|
border-radius: var(--border-radius);
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: var(--transition);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
/* 禁用按钮样式 */
|
|
button.disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
transform: none !important;
|
|
box-shadow: none !important;
|
|
}
|
|
button.disabled:hover {
|
|
transform: none !important;
|
|
box-shadow: none !important;
|
|
}
|
|
|
|
/* 按钮类型样式 */
|
|
#connect-button {
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
}
|
|
#connect-button:hover {
|
|
background-color: var(--primary-hover);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
|
|
}
|
|
#disconnect-button {
|
|
background-color: var(--danger-color);
|
|
color: white;
|
|
}
|
|
#disconnect-button:hover {
|
|
background-color: var(--danger-hover);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
|
|
}
|
|
#start-button {
|
|
background-color: var(--secondary-color);
|
|
color: white;
|
|
}
|
|
#start-button:hover {
|
|
background-color: var(--secondary-hover);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 6px 16px rgba(46, 204, 113, 0.4);
|
|
}
|
|
#stop-button {
|
|
background-color: var(--warning-color);
|
|
color: white;
|
|
}
|
|
#stop-button:hover {
|
|
background-color: var(--warning-hover);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 6px 16px rgba(243, 156, 18, 0.4);
|
|
}
|
|
|
|
/* 设置区域 */
|
|
.settings {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 20px;
|
|
}
|
|
|
|
/* 选择器容器 */
|
|
.resolution-config,
|
|
.display-mode-config {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
/* 标签样式 */
|
|
label {
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* 选择框样式 */
|
|
select {
|
|
padding: 10px 12px;
|
|
border: 1px solid #e0e0e0;
|
|
border-radius: var(--border-radius);
|
|
font-size: 14px;
|
|
background-color: white;
|
|
transition: var(--transition);
|
|
cursor: pointer;
|
|
}
|
|
select:hover {
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
|
|
}
|
|
select:focus {
|
|
outline: none;
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
|
|
}
|
|
|
|
/* 画布容器 */
|
|
.canvas-container {
|
|
background-color: var(--card-background);
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--box-shadow);
|
|
padding: 20px;
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
/* 选择文本样式 */
|
|
::selection {
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
}
|
|
|
|
/* 滚动条样式 */
|
|
::-webkit-scrollbar {
|
|
width: 8px;
|
|
height: 8px;
|
|
}
|
|
::-webkit-scrollbar-track {
|
|
background: #f1f1f1;
|
|
border-radius: 4px;
|
|
}
|
|
::-webkit-scrollbar-thumb {
|
|
background: #c1c1c1;
|
|
border-radius: 4px;
|
|
}
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: #a8a8a8;
|
|
}
|