Skip to content

用AI写的自定义样式-百度-单列居中,解决按钮遮挡问题,虽然有些不完美,供大家参考 #828

Description

@zjx1201
Image Image

/* 1. 隐藏结果页里的大 logo */
.wrapper_new #lg {
display: none !important;
}

/* 2. 头部容器宽度自适应 */
.wrapper_new .s_form.s_form_fresh {
width: 100% !important;
padding: 0 !important;
margin: 0 auto !important;
}

/* 3. 核心布局:flex 水平居中 + 垂直居中 /
.s_form > .s_form_wrapper {
margin: 0 auto !important;
margin-left: -40px !important; /
整体左移 */
display: flex !important;
justify-content: center !important;
align-items: center !important;
max-width: 1180px !important;
padding: 0 20px !important;
}

/* 4. Logo 间距 + 垂直对齐 /
.wrapper_new .head_wrapper #result_logo {
margin-top: 8px !important; /
把 logo 往下压,和输入框对齐 /
margin-bottom: 0 !important;
margin-left: 0 !important;
margin-right: 24px !important;
flex-shrink: 0 !important;
display: flex !important; /
logo 内部垂直居中 */
align-items: center !important;
}

/* 关键:不要再写 display: block !important,否则两个 logo 会叠出来 */
.wrapper_new .head_wrapper #result_logo img {
vertical-align: middle !important;
}

/* 5. 智能输入框去掉上下边距 */
.smart_input_wrapper #main-wrapper,
.wrapper_new .s_form_fresh #main-wrapper {
margin-top: 0 !important;
margin-bottom: 0 !important;
}

/* 6. 旧输入框清掉 top 偏移 */
form.fm .s_ipt_wr.bg {
position: relative !important;
top: 0 !important;
}

/* 7. 右侧导航保持间距 */
.s_form > .s_form_wrapper > :last-child {
flex-shrink: 0 !important;
margin-left: 20px !important;
}

/* 8. 精准隐藏多余输入框 */
input:not(#kw):not(#su):not(.myuserconfig) {
display: none !important;
}
.s_ipt_wr:not(:has(#kw)) {
display: none !important;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions