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]){