【发布时间】:2014-05-09 16:11:12
【问题描述】:
我想为图片创建一个圆形阴影并为 CSS 创建一个按钮,我在 CSS3 Drop Shadows Generator 中找到了一个为盒子创建圆形阴影的解决方案。
但我不知道如何为我的案例应用代码(用于图像和按钮)
.box {
position: relative;
width: 400px;
height: 300px;
background-color: #fff;
box-shadow: 0 1px 5px rgba(0,0,0,0.25), 0 0 50px rgba(0,0,0,0.1) inset;
border-radius: 1% 1% 1% 1% / 1% 1% 1% 1%;
}
.box:after {
position: absolute;
width: 64%;
height: 12%;
left: 18%;
border-radius: 50%;
z-index: -1;
bottom: 0%;
content: "";
box-shadow: 0 50px 24px rgba(0,0,0,0.24);
}
感谢您的支持!
【问题讨论】:
-
毕竟,我发现阴影在页面底部。谢谢大家