html - Stack two borders with drop-shadows? -
how wrap border around border , have them both use inset drop-shadows (like double matting in picture frame)?
you can accomplish using :before , :after pseudo-elements. see jsfiddle demos @ end of answer.
html
<div class="frame"><img src="../img/logo.png"></div> css
.frame { display:inline-block; position:relative; margin:20px; z-index:5; padding:10px; background:#376b90; } .frame:before { position:absolute; content:"."; display:block; font-size:0; color:transparent; /* change left, right, top, bottom, , box-shadow position */ left:0; top:0; right:0; bottom:0; box-shadow:inset 0 0 3px 2px black; } .frame:after { position:absolute; content:"."; display:block; font-size:0; color:transparent; /* change left, right, top, bottom, , box-shadow position */ left:5px; top:5px; right:5px; bottom:5px; box-shadow:inset 0 0 3px 2px black; }
Comments
Post a Comment