Agyan
adda
Run
Reset
Copy
CSS Tutorial › CSS Shadows › Card shadows
Back to tutorial
Code
Edit, then press Run or Ctrl+Enter
<style> body { background: #f4f6fa; } .card { background: white; padding: 20px; margin: 16px 0; border-radius: 10px; transition: box-shadow .2s; } .soft { box-shadow: 0 4px 12px rgba(0,0,0,.12); } .soft:hover { box-shadow: 0 10px 24px rgba(0,0,0,.2); } .inset { box-shadow: inset 0 2px 6px rgba(0,0,0,.2); } h2 { text-shadow: 1px 2px 3px rgba(0,0,0,.3); color: #1f386b; } </style> <h2>Shadows</h2> <div class="card soft">Soft shadow (hover me)</div> <div class="card inset">Inset shadow</div>
Result