gpt4 book ai didi

html - 如何设置相同的填充大小

转载 作者:行者123 更新时间:2023-11-28 19:24:01 24 4
gpt4 key购买 nike

我的网页上有一张图片,我不明白为什么填充只设置在左侧。右侧不显示任何边距。

这是我的 CSS:

#main {
margin-top: 0px;
margin-bottom: 10px;
}

#main {
margin-top: 100px;
margin-bottom: 100px;
}

@media (min-width: 768px) .noo-container {
max-width: 750px;
width: 100%;
}

.noo-container {
margin-right: auto;
margin-left: auto;
width: 100%;
padding-left: 15px;
padding-right: 15px;
}

article,
aside,
details,
figcapti figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}

* {
font-family: "helvetica", "arial", "sans-serif";
}

我希望左右边距相同。

页面是https://prueba.soygorrion.com.ar/home/ .

最佳答案

这是由于在 div 上使用了“background-image”属性造成的。使用标签要容易得多,也更常见。

<div class="tp-bgimg defaultimg">
<img src="https://prueba.soygorrion.com.ar/wp-content/uploads/2019/05/HEAD1-1024x532.jpg">
</div>
.bgimg {
width: 100%;
height: 100%;
opacity: 1;
visibility: inherit;
z-index: 20;
}
.bgimg img {
margin: 0 10px;
width: calc(100% - 21px);
}

关于html - 如何设置相同的填充大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56725829/

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