gpt4 book ai didi

html - 在使用该类的图像下方需要一个阴影图像

转载 作者:太空宇宙 更新时间:2023-11-04 13:39:09 24 4
gpt4 key购买 nike

enter image description here

我想在 img 类中使用上面的图像将照片放在下面。有那个类(class)。请参阅下面的标记示例。

<img class="img-shadow" src="image.jpg">

或者可能是这样的

<div class="img-shadow">
<img src="image.jpg">
</div>

CSS 看起来如何?

最佳答案

HTML:

<div class="img-shadow">
<img src="image.jpg">
</div>

CSS:

.img-shadow{
background:url(your image URL) no-repeat center bottom;
padding-bottom:20px;
text-align:center;
}

调整 div 底部的内边距以增加或减少图像底部与阴影之间的距离。

关于html - 在使用该类的图像下方需要一个阴影图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22818532/

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