gpt4 book ai didi

javascript - 图像未填满整个区域

转载 作者:太空宇宙 更新时间:2023-11-04 06:36:15 25 4
gpt4 key购买 nike

当我应用 border-radius 属性时,它在 Angular 和顶部显示了一些间隙。仅当图像大于外部 div 时才会发生这种情况。

我想填满方框而不在任何地方显示任何空格

JSFiddle 链接:https://jsfiddle.net/utx37Ldn/

white space in the corner

<div class="main-container">

<ul class="img-container">
<li class="li-min-width" style="height:202px">
<div class="img-div-style" style="height: 162px; border-radius: 15px; width: 162px;">
<div class="img-box">
<label class="img-box-label" style="height: 100%; line-height: 162;">
<img src="https://data.whicdn.com/images/296659660/large.jpg" alt="Cat" class="img-class" style="height:auto !important; width:auto !important;"/>
<div class="img-overlay" style="width:100% !important; height:100% !important; margin-top: 0px !important;">
<div class="img-overlay-hover">
<i class="fa fa-hand-o-up" style="border-radius: 0%; overflow: hidden;"></i>
</div>
</div>
</label>
</div>
</div>
</li>


<li class="li-min-width" style="height:202px">
<div class="img-div-style" style="height: 162px; border-radius: 15px; width: 162px;">
<div class="img-box">
<label class="img-box-label" style="height: 100%; line-height: 162;">
<img src="https://n2.sdlcdn.com/imgs/h/f/z/YAZOLE-Quartz-Watch-Women-Watches-SDL236029623-1-6e589.jpg" alt="Flower" class="img-class" style="height:auto !important; width:auto !important;"/>
<div class="img-overlay" style="width:100% !important; height:100% !important; margin-top: 0px !important;">
<div class="img-overlay-hover">
<i class="fa fa-hand-o-up" style="border-radius: 0%; overflow: hidden;"></i>
</div>
</div>
</label>
</div>
</div>
</li>


<li class="li-min-width" style="height:202px">
<div class="img-div-style" style="height: 162px; border-radius: 15px; width: 162px;">
<div class="img-box">
<label class="img-box-label" style="height: 100%; line-height: 162;">
<img src="https://wallpaperbrowse.com/media/images/3848765-wallpaper-images-download.jpg" alt="Flower" class="img-class" style="height:auto !important; width:auto !important;"/>
<div class="img-overlay" style="width:100% !important; height:100% !important; margin-top: 0px !important;">
<div class="img-overlay-hover">
<i class="fa fa-hand-o-up" style="border-radius: 0%; overflow: hidden;"></i>
</div>
</div>
</label>
</div>
</div>
</li>

<li class="li-min-width" style="height:202px">
<div class="img-div-style" style="height: 162px; border-radius: 15px; width: 162px;">
<div class="img-box">
<label class="img-box-label" style="height: 100%; line-height: 162;">
<img src="https://wallpaperbrowse.com/media/images/ff2e54f2ca5c09a877fb04d84bc562a4.jpg" alt="Flower" class="img-class" style="height:auto !important; width:auto !important;"/>
<div class="img-overlay" style="width:100% !important; height:100% !important; margin-top: 0px !important;">
<div class="img-overlay-hover">
<i class="fa fa-hand-o-up" style="border-radius: 0%; overflow: hidden;"></i>
</div>
</div>
</label>
</div>
</div>
</li>

</ul>
</div>

有人可以帮我解决我做错的事吗?

最佳答案

删除 .img-box-label border-radius 属性并添加 overflow: hidden;.img-div-样式

https://jsfiddle.net/gudzdanil/naz84hde/2/

关于javascript - 图像未填满整个区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54200360/

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