ผมพบว่า (บางส่วน) ของโค้ด CSS wp-content/themes/twentyseventeen/style.cssที่ควบคุมความสูงใน
มีรหัสที่ใช้เมื่อไม่เห็นแถบผู้ดูแลระบบ(ผู้ใช้ทั่วไปที่ไม่ระบุชื่อ) ในปัจจุบันที่บรรทัด 3629
.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;
}
และรหัสที่ใช้เมื่อแถบผู้ดูแลระบบคือมองเห็นได้ (เช่นคุณเข้าสู่ระบบ) ขณะที่เส้น 3646
.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(100vh - 32px);
}
จากนั้นโค้ดที่ใช้กับมือถือในปัจจุบันที่บรรทัดที่ 1638:
.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: 75vh;
        width: 100%;
}
โดยการคัดลอกสามส่วนของ css ลงใน style.css ชุดรูปแบบลูกของฉันและปรับเปลี่ยนheightคุณลักษณะที่ฉันสามารถปรับความสูงสำหรับภาพส่วนหัวในหน้าแรก ผมตั้งความสูง30vh, calc(30vh - 32px)และ30vhตามลำดับในแต่ละส่วน ฉันทิ้งคนแรกไว้height: 1200pxคนเดียว
หมายเหตุองค์ประกอบความสูงมีการตั้งค่า100vhซึ่งขนาดความสูงเทียบกับความสูงวิวพอร์ต ดังนั้น 100vh คือ 100% ของวิวพอร์ตในขณะที่ 50vh คือ 50% ของวิวพอร์ต
สิ่งหนึ่งที่แปลกคือในหน้าแรกการซูมและตำแหน่งของภาพส่วนหัวจะแตกต่างจากในหน้าอื่น ๆ
ไม่แน่ใจว่านี่เป็นวิธีที่ดีที่สุดหรือไม่ ฉันเปิดให้ตัวเลือกที่ดีกว่า แต่จนถึงขณะนี้มันทำงานในระดับพื้นฐาน
               
              
theme-twenty-seventeenแท็กเมื่อดูเหมือนว่ามีแท็กที่เกี่ยวข้องสำหรับปีก่อนหน้า