“How to create a shadow effect when hovering on a box?”
DEMO: How It Looks
HTML
<div class="">TRY HOVERING OVER THE BOX!</div>
CSS
.button-pop { border: 2px solid black; padding: 1rem; width:200px; height:200px; } .button-pop:hover { position: relative; right: 5px; bottom: 5px; box-shadow: 7px 7px #111; }
It’s pretty simple. Enjoy coding!