WordPress 二十十七个主题带有整页标题图像。我想将标题图片的大小减小到更典型的标题大小,只填充屏幕的一部分并消除视差效果。
最佳答案
在二十十七主题的函数文件中可以修改header的宽/高,定义如下函数。
add_image_size( 'twentyseventeen-featured-image', 2000, 1200, true );
对于上述功能,您还必须在 css 中调整高度,您也可以像下面的示例一样调整高度。
.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{height: 75vh !important;}
在高度中添加 !important 或在这里您还可以更改标题的高度。
关于html - 如何降低 WordPress 2017 主题中的标题图片高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43344426/