【发布时间】:2019-07-02 02:17:14
【问题描述】:
我有一个包含图像的容器,并且在该图像的顶部有一个按钮,但在容器内部,在右侧创建了一些“额外”空间。我需要删除这个额外的空间,因为它占用了太多空间。 3 个水平图像在中心对齐,同时使用柔性显示。使用引导程序。
没有宽度或高度的大小,它只是这个按钮后面的图像。
<br>
<h1 class="text-center">¿Qué temas te interesan?</h1>
<div class="row justify-content-around">
<div class="d-flex align-content-center flex-wrap container-img-intereses">
<a href="#"> <br> <img src="/btn-desarrollo-ing.png" width="350px"/></a>
<button type="button" class="btn btn-primary" id="wrapper-button">Carreras</button>
</div>
<div class="d-flex align-content-center flex-wrap">
<a href="#"> <br>
<img src="/btn-diseno-ux.png" width="350px"/></a>
</div>
<div class="d-flex align-content-center flex-wrap">
<a href="#"><br>
<img src="/btn-mkt.png" width="350px"/></a>
</div>
</div>
<div class="row justify-content-around">
<div class="d-flex align-content-center flex-wrap">
<a href="#"> <br>
<img src="/btn-negocios.png" width="350px"/></a>
</div>
<div class="d-flex align-content-center flex-wrap">
<a href="#"> <br>
<img src="/btn-comunidad.png"width="350px"/></a>
</div>
<div class="d-flex align-content-center flex-wrap">
<a href="#"> <br>
<img src="/btn-produccion-aud.png"width="350px"/></a>
</div>
</div>
<br>
<div class="d-flex justify-content-center flex-wrap">
<a href="#"><img src="/btn-crecimiento-prof.png"width="350px"/></a>
</div>
.container-img-intereses {
border: 1px solid black;
display: inline-flex;
align-items: center;
text-align: center;
}
.container-img-intereses > img {
position: absolute;
z-index: -1;
}
.btn {
right: 80px;
top: 40px;
position: relative;
z-index: 1;
}
https://imgur.com/a/JEo68bF我必须重复这个并把它变成一个过程,所以一个按钮总是在这些矩形的顶部。
【问题讨论】:
-
你有更多的 HTML 示例吗?
-
是的!当然,我刚刚更新了问题。
标签: html css image button division