You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何移除WooCommerce Booking网站页眉与首区块间的空白?

解决Storefront主题首页页眉与横幅间的空白问题

你已经通过以下CSS隐藏了首页标题:

.page .entry-title {
display: none;
}

但页眉和横幅之间仍有空白,原因是标题隐藏后,标题所在容器及页面主体区域还保留着默认间距。添加以下CSS代码即可清除这些多余间距,让横幅与页眉紧密贴合:

/* 清除首页页眉与横幅间的多余间距 */
.home .site-main {
    margin-top: 0;
    padding-top: 0;
}
.home .entry-header {
    margin-bottom: 0;
}
.home .entry-content {
    padding-top: 0;
}

把上述代码添加到WordPress后台的「外观 > 自定义 > 额外CSS」区域就能生效。

内容的提问来源于stack exchange,提问作者devOP1

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.18 21:18:10