可以使用CSS的box-shadow属性来为卡片添加阴影效果,同时使用border-radius属性来实现圆角边框。
具体实现步骤如下:
.card {
width: 300px;
height: 200px;
background-color: #fff;
border-radius: 10px;
}
.card {
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
}
其中,0px表示阴影的水平偏移量为0,4px表示阴影的垂直偏移量为4px,20px表示阴影的模糊半径为20px,rgba(0, 0, 0, 0.1)表示阴影的颜色为黑色,透明度为0.1。
.card {
width: 300px;
height: 200px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
}
可以根据实际需求调整卡片容器的宽度、高度、背景颜色、圆角半径和阴影效果的参数。