gpt4 book ai didi

css - WordPress Bakery - 将行设置为图像背景的全高(无内容)

转载 作者:行者123 更新时间:2023-11-28 02:16:05 27 4
gpt4 key购买 nike

我有一行使用 WP Bakery(以前的 Visual Composer),其中有两列只是背景图像。没有内容。但是,当我在 WordPress 的前端编辑器中将行设置为全高时,该行仍然不会垂直拉伸(stretch)以适应整个图像高度。它在顶部显示了大约 1/4 的图像,然后其余部分被切断。

<div style="position: relative; left: -45px; box-sizing: border-box; width: 
1256px;" data-vc-full-width="true" data-vc-full-width-init="true" data-vc-
stretch-content="true" class="normal_height vc_row wpb_row vc_row-fluid
vc_row-o-full-height vc_row-o-columns-stretch vc_row-o-equal-height vc_row-
flex">
<div class="wpb_column vc_column_container vc_col-sm-6 vc_col-has-fill">
<div class="vc_column-inner vc_custom_1517014250070">
<div class="wpb_wrapper">
</div>
</div>
</div>
<div class="wpb_column vc_column_container vc_col-sm-6 vc_col-has-fill">
<div class="vc_column-inner vc_custom_1517014312168">
<div class="wpb_wrapper"></div>
</div>
</div>
</div>

CSS for left image:
.vc_custom_1517014250070 {
background-image: url(/uploads/2018/01/hbar-chart.jpg?id=2944)
!important;
background-position: 0 0 !important;
background-repeat: no-repeat !important;
}

CSS for right image:
.vc_custom_1517014312168 {
background-image: url(/uploads/2018/01/f-mix.jpg?id=2943) !important;
background-position: 0 0 !important;
background-repeat: no-repeat !important;
}

最佳答案

不要使用背景图片,而是插入全宽图片。

页面元素永远不会将其大小调整为背景图像,只有相反的情况才有可能(不是规则)。所以只需在图像中使用 img 元素

关于css - WordPress Bakery - 将行设置为图像背景的全高(无内容),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48471242/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com