[英]Responsive height on div with wordpress page
如何制作一个 div 来显示 wordpress 页面中的内容。php 响应 Wordpress 页面高度。 这是我在我的网站上显示页面的方式。
<?php
while(have_posts()) {
the_post(); ?>
<div class="page-content">
<h1> <?php the_title(); ?> </h1>
<?php the_content(); ?>
</div>
css:
.page-content {
display: inline-block;
width: 70%;
height: 135vh;
border: 1px black solid;
margin-left: 5%;
padding: 16px;
background-color: white;
}
我可以使div的高度与wp页面上的高度相同吗?
要在页面中设置 div 的高度,请不要强制设置高度并添加
min-height : 100vh
据我了解
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.