<div class="chat-content">
<div class="chat-box">
内容
</div>
</div>
<style>
.chat-box {
overflow-y: auto;
max-height: 200px;
}
.chat-box::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(246, 246, 247, 1) 100%);
}
</style>
【无标题】为一个盒子添加边缘遮罩层的CSS样式
最新推荐文章于 2024-07-03 23:56:01 发布