我在 html
标签上使用背景 img
而 img
不在中心。我使用 background size: cover;
但它无法正常工作
<section class="section-a">
<h1 class="main-header-sec-a">Bienvendio a Vida Excotica</h1>
</section>
.section-a{
background-image: url('/img/waffles.jpeg');
min-height: 100%;
height: 700px;
background-size: cover;
}
这是结果
这是我的
最佳答案
关于html - 如何在移动设备上使用 css 使图像居中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51235982/