這裏是我的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