乾淨的 選單、Grok、高級訂閱、已認證組織、其他、探索、通知、訊息、社群、書籤、右側邊欄、靜音通知和可自訂設定
< 腳本X/Twitter 乾淨的選單和側邊欄(支持多種語言)的回應
if (settings.useLargerCSS) { // 计算左侧边栏宽度,使整体布局居中 const sidebarWidth = Math.max(68, Math.floor((window.innerWidth - settings.cssWidth) / 2) - 20); cssRules += `.r-1ye8kvj { max-width: ${settings.cssWidth}px !important; }`; cssRules += '.r-10f7w94 { margin-right: 0px !important; }'; // 动态计算左侧边栏宽度,使整体布局居中 cssRules += `.css-175oi2r.r-1f2l425.r-13qz1uu.r-417010.r-18u37iz > header { max-width: ${sidebarWidth}px !important; }`; // 添加主容器居中样式 cssRules += '.css-175oi2r.r-aqfbo4.r-gtdqiz.r-1gn8etr.r-1g40b8q { justify-content: center !important; }'; }===反正 AI 告诉我,这么搞就能让页面居中了.博主,要不你再优化一下
登入以回復
土豆服务器,请按需使用
镜像地址随时可能被墙,建议加群获取最新地址
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址
if (settings.useLargerCSS) {
// 计算左侧边栏宽度,使整体布局居中
const sidebarWidth = Math.max(68, Math.floor((window.innerWidth - settings.cssWidth) / 2) - 20);
cssRules += `.r-1ye8kvj { max-width: ${settings.cssWidth}px !important; }`;
cssRules += '.r-10f7w94 { margin-right: 0px !important; }';
// 动态计算左侧边栏宽度,使整体布局居中
cssRules += `.css-175oi2r.r-1f2l425.r-13qz1uu.r-417010.r-18u37iz > header { max-width: ${sidebarWidth}px !important; }`;
// 添加主容器居中样式
cssRules += '.css-175oi2r.r-aqfbo4.r-gtdqiz.r-1gn8etr.r-1g40b8q { justify-content: center !important; }';
}
===
反正 AI 告诉我,这么搞就能让页面居中了.
博主,要不你再优化一下