<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 4 年前。
标签 html css transparency
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 4 年前。
我发现一个网站的主体 div 部分是透明的,但没有使整个主体也透明。
这是通过屏蔽不同大小的 div 实现的吗?
最佳答案
如果您检查该页面,您会发现它具有 rgba 线性渐变,可提供您正在寻找的效果。在这种特定情况下,它位于 .page
类中:
.page {
background: linear-gradient(135deg, rgba(255,255,255,0) 0%, #FBFBFB 30vw);
}
检查网页是学习和实验的好方法。您可以尝试直接在开发工具中修改这些值,并立即在页面上看到效果。
关于html - 使部分div透明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53321052/