我一直在编辑二十七个主题通过一个子主题在我的Wordpress博客,我试图调整滚动高度的标题,因为它占用了太多的空间以前。我想要更多的传统头球。
注意,我不想调整或裁剪实际的页眉大小,而是裁剪标题所占用的垂直高度的大小。在四处搜索时,我找到了一种通过以下线程来完成此操作的方法:
但是,这只会调整主页的高度,而不会调整任何其他页面的高度。我希望所有的页面都是一样的。(我的参考,我的网站在这里http://chugsforlife.esy.es/,如果你在主页上的标题高度是好的,但去任何其他网页,它是可笑的挤压)
编辑:下面是我最初添加到wordpress子主题的style.css中的代码:
.twentyseventeen-front-page.has-header-image .custom-header-media,
.twentyseventeen-front-page.has-header-image .custom-header-media,
.twentyseventeen-front-page.has-header-video .custom-header-media,
.home.blog.has-header-image .custom-header-media,
.home.blog.has-header-video .custom-header-media {
height: 1200px;
height: 60vh;
max-height: 100%;
overflow: hidden;
}
.admin-bar.twentyseventeen-front-page.has-header-image .custom-header-media,
.admin-bar.twentyseventeen-front-page.has-header-video .custom-header-media,
.admin-bar.home.blog.has-header-image .custom-header-media,
.admin-bar.home.blog.has-header-video .custom-header-media {
height: calc(60vh - 32px);
}
.has-header-image.twentyseventeen-front-page .custom-header,
.has-header-video.twentyseventeen-front-page .custom-header,
.has-header-image.home.blog .custom-header,
.has-header-video.home.blog .custom-header {
display: table;
height: 300px;
height: 55vh;
width: 100%;
}发布于 2017-07-30 19:46:12
从您提到的问题来看,这是代码:
.twentyseventeen-front-page.has-header-image .custom-header-media,
.twentyseventeen-front-page.has-header-video .custom-header-media,
.home.blog.has-header-image .custom-header-media,
.home.blog.has-header-video .custom-header-media {
height: 1200px;
height: 100vh;
max-height: 100%;
overflow: hidden;
}修改:尝试从选择器中删除主页和首页,以供特定用途:您可以使用它来替换您所放的内容,它也将覆盖头版。
.has-header-image .custom-header-media, blog.has-header-image .custom-header-media {
height: 1200px;
height: 70vh;
max-height: 100%;
overflow: hidden;
}
.has-header-image .custom-header {
display: table;
height: 300px;
width: 100%;
}https://wordpress.stackexchange.com/questions/275209
复制相似问题