From e4ca647457313781532b9cff036f1ddcfb15980c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B1=BC=E9=AA=A8=E5=89=AA?= <1580622474@qq.com> Date: Thu, 3 Oct 2024 11:39:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=80=E4=B8=8B?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 7bbc505..9a07e84 100644 --- a/index.html +++ b/index.html @@ -17,6 +17,11 @@ .server-name { font-weight: bold; margin-bottom: 5px; + font-size: 24px; /* 调整字体大小 */ + background-color: black; /* 背景色设为黑色 */ + color: white; /* 文字颜色设为白色 */ + padding: 10px; /* 增加内边距使其更美观 */ + border-radius: 5px; /* 可选:增加圆角效果 */ } .gpu-info { margin-top: 10px; @@ -101,13 +106,6 @@ serverName.classList.add('server-name'); let updateFlag = serverData[key].updated ? '' : ' - Not updated -'; serverName.textContent = key + updateFlag; - // 设置标题字体大小 - serverName.style.fontSize = '22px'; // 直接设置字体大小 - serverName.style.fontWeight = 'bold'; // 可选:加粗标题 - serverName.style.backgroundColor = 'black'; // 背景设为黑色 - serverName.style.color = 'white'; // 文字设为白色 - serverName.style.padding = '10px'; // 增加内边距 - serverName.style.borderRadius = '5px'; // 可选:增加圆角 serverCard.appendChild(serverName); // 内存 if ('memory_info' in serverData[key]){