在图像块中设置图像大小,但页面显示具有不同高度和宽度的图像

时间:2021-04-23 18:19:56

标签: wordpress wordpress-gutenberg

我正在使用 WooCommerce 在 wordpress 中创建一个新站点,我使用的是 Astra 主题。我想创建一个页面,其中包含两个并排且高度相同的图像。 我在每列中添加了两列和一个图像块,并调整了两幅图像的大小,它们在古腾堡中看起来不错:

enter image description here

enter image description here

但是当我将页面可视化时,这两个图像的大小与古腾堡中设置的大小不同:

enter image description here

你知道我如何获得合适的高度吗?

1 个答案:

答案 0 :(得分:-1)

使用此代码获取相同大小的图像

<div class="row">
   <div class="col-md-6"><img src="1.jpg"><div>
   <div class="col-md-6"><img src="2.jpg"><div>
</div>
相关问题