gpt4 book ai didi

css - 带有CSS的图像底部的渐变

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

你好我想用图像(不是背景图像)产生这种效果: enter image description here

你知道我如何用 css 创建这种效果吗?

最佳答案

看看这个:

img {
width: 400px;
}

.content {
background: rgba(255, 255, 255, 0) linear-gradient(to bottom, rgba(0, 0, 0, 0) 10%, rgba(255, 255, 255, .1) 40%, rgba(255, 255, 255, .5) 75%, rgba(255, 255, 255, 1) 100%) repeat scroll 0 0;
position: relative;
margin-top: -200px;
height: 200px;
}
<img src="http://www.dl.21tech.ir/img-upload/2016/12/95092801.jpg" />
<div class="content"></div>

关于css - 带有CSS的图像底部的渐变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42694507/

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