Last active
February 20, 2022 14:05
-
-
Save brrd/baf587a2876b8de3b53162adeacbdc4c to your computer and use it in GitHub Desktop.
Subtle inset box-shadow on round images
This file contains hidden or 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
.img-container { | |
width: 100%; | |
max-width: 100px; | |
position: relative; | |
} | |
.img-container::after { | |
content: ''; | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
border-radius: 50%; | |
box-shadow: inset 0 0 5px 1px rgba(0, 0, 0, 0.1) | |
} | |
.img-container img { | |
width: 100%; | |
border-radius: 50%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks to your code above, I was able to apply the very nice inset-box-shadow to my round profile picture. Happy coding :)