【发布时间】:2019-08-18 15:46:07
【问题描述】:
我正在尝试在 wordpress 上制作一个响应式主题。当我使用桌面分辨率时,缩略图会 100% 调整为卡,但是当我将分辨率降低到移动设备时,它会比卡更大。为什么会这样?
我已经尝试添加 bootstrap 4 响应式图像类。
<section id="blog" class="blog d-flex align-items-center mt-5 mb-5">
<?php query_posts('posts_per_page=3'); ?>
<div class="container">
<div class="d-flex align-items-center">
<h1>ÚLTIMAS<BR>PUBLICAÇÕES</h1> </div> <div class="row">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="col-sm-7 col-md-4 mt-3">
<a href="<?php the_permalink() ?>"><img src="<?php the_post_thumbnail_url('thumbnail'); ?>" class="rounded-top"></a>
<div class="card-body border rounded-bottom">
<h4 class="card-title border-bottom pb-3 "><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h4>
<p class="card-text"><?php the_subtitle(); ?></p>
<a href="<?php the_permalink() ?>" class="btn btn-outline-dark btn-sm">Continuar lendo</a>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</section>
预期:
现实:
wordpress 管理面板上配置的缩略图大小为 350 x273px
【问题讨论】:
标签: wordpress twitter-bootstrap thumbnails