I want to create card stack using css box-shadow
, it's working great without border-radius
, but when I add radius it's losing roundness as it progresses. Please see the below code.
I want this result
body {
background : #0c1013;
font-family : arial;
}
.card {
margin: 0 auto 2em;
padding: 2em;
width: 80%;
border-radius:4px;
background-color: #f2f2f2;
word-wrap: break-word;
box-shadow: 0 0.0625em 0.1875em 0 rgba(0, 0, 0, 0.1), 0 0.5em 0 -0.25em #f2f2f2, 0 0.5em 0.1875em -0.25em rgba(0, 0, 0, 0.1), 0 1em 0 -0.5em #e5e5e5, 0 1em 0.1875em -0.5em rgba(0, 0, 0, 0.1);
}
.card.noradius {
border-radius:0;
}
<div class="card">
<p>Here's a stack of cards <code>with border radius</code>. </p>
</div>
<div class="card noradius">
<p>Here's a stack of cards <code>without border radius</code>. </p>
</div>