Created
February 17, 2023 20:05
-
-
Save SlashScreen/3ad453cb4097b7e9cb4c39cdb458f792 to your computer and use it in GitHub Desktop.
drop shadow problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the "deer.png" image is taken from here: | |
https://duckduckgo.com/?t=ffab&q=deer+png&atb=v342-1&iax=images&ia=images&iai=https%3A%2F%2Fi.pinimg.com%2Foriginals%2Ff5%2F72%2F0c%2Ff5720c143faa8d11e3ab2ced3cefef59.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="main.css"/> | |
</head> | |
<body> | |
<div class="drop-shadow"></div> | |
<p>hi</p> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.drop-shadow { | |
position: relative; | |
content: url("deer.png"); | |
background-repeat: no-repeat; | |
width: 400px; | |
height: 400px; | |
} | |
.drop-shadow::before { | |
position: absolute; | |
content: url("deer.png"); | |
transform: skewX(60deg); | |
filter: drop-shadow(0 0 0.5rem #000); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.drop-shadow{ | |
position: relative; | |
content: url("deer.png"); | |
background-repeat: no-repeat; | |
width: 400px; | |
height: 400px; | |
&::before{ | |
position: absolute; | |
content: url("deer.png"); | |
//transform: rotateX(80deg); | |
transform: skewX(60deg); | |
filter: drop-shadow(0 0 0.5rem #000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment