I recently applied the "Filter: drop-shadow" effect to my png photo and it worked perfectly. However, I am now interested in hiding the actual png image while retaining the shadow effect.
My initial attempt involved adjusting the translate and drop-shadow x-axis values in the CSS code below:
I also contemplated achieving this through Photoshop. Is there a way to directly hide the png image using CSS?
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
:root {
--distance: 100vw;
}
.photo {
width: 100%;
filter: drop-shadow(var(--distance) 10px 5px #ff0000);
position: relative;
display: block;
transform: translate(-100%, 0%);
}
<div>
<img src="nba.png" alt="..." class="photo">
</div>