its like this it needs to be like this 我试图在不影响整行的最大宽度的情况下更改背景图像宽度。
我尝试了不同的大小属性,但行的最大宽度为 80%,我只需要最大宽度为 100% 的背景图像。
这是该行的选择器/规则:
.et_pb_row {
position: relative;
width: 80%;
max-width: 1920px;
margin: auto;
}
这是行背景图像的选择器/规则:
.et_pb_row_0 {
background-size: contain;
background-position: top right;
background-image: url(http://fordent.uk.w3pcloud.com/wp-content/uploads/2019/01/GettyImages-532174359.jpg);
}
最佳答案
这里检查link
在这里,我已经设置了相对于 body
的位置,在您的情况下,它可能是 .et_pb_row
的父 div,您已将 width: 80%;
并为那个 ::after
设置一个伪元素,因为我提供了 background-image
希望这会有所帮助。
关于html - 更改行背景图像宽度而不影响行的最大宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54440584/