这里是我的jsfiddle:http://jsfiddle.net/7FFRV/1/边框阴影
我试图让蓝色边框去背后的红色圆圈的盒子阴影,但在容器的前面。我将如何做到这一点?
HTML:
<div class="container">
<div class="image"></div>
</div>
CSS:
.container {
width: 250px;
height: 250px;
padding: 30px;
background: #fbfbfb;
border: 1px solid black;
}
.image {
width: 150px;
height: 150px;
background: red;
border-radius: 500px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.75);
}
.image:after {
content: "";
position: absolute;
left: -0;
width: 150px;
height: 150px;
border-radius: 500px;
border: 10px solid #0077ca;
}
谢谢!很棒! – Bagwell