Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Realistic Image Shadows
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Markshall" data-source="post: 461631" data-attributes="member: 1872"><p>Everyone is familiar with the usual effect of adding a barely visible shadow to images with an almost-transparent background, but I found <a href="https://www.instagram.com/p/CBLF6hDAHPh/" target="_blank">a post on Instagram</a> and decided to try to replicate it in CSS</p><p></p><p>It uses CSS variables to dynamically size the element and it's shadow and an [icode]::after[/icode] element to generate its shadow and place it based on the [icode]--size[/icode] variable.</p><p>Feel free to play around with the [icode]--size[/icode] variable to see how the shadows respond</p><p></p><p><a href="https://codepen.io/Markshall/pen/dyGMoXr" target="_blank">View on Codepen</a></p><p></p><p><strong>Final outcome:</strong></p><p>[spoiler]<img src="https://i.imgur.com/6ZfrnUI.png" alt="" class="fr-fic fr-dii fr-draggable " style="" />[/spoiler]</p></blockquote><p></p>
[QUOTE="Markshall, post: 461631, member: 1872"] Everyone is familiar with the usual effect of adding a barely visible shadow to images with an almost-transparent background, but I found [URL='https://www.instagram.com/p/CBLF6hDAHPh/']a post on Instagram[/URL] and decided to try to replicate it in CSS It uses CSS variables to dynamically size the element and it's shadow and an [icode]::after[/icode] element to generate its shadow and place it based on the [icode]--size[/icode] variable. Feel free to play around with the [icode]--size[/icode] variable to see how the shadows respond [URL='https://codepen.io/Markshall/pen/dyGMoXr']View on Codepen[/URL] [B]Final outcome:[/B] [spoiler][IMG]https://i.imgur.com/6ZfrnUI.png[/IMG][/spoiler] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Realistic Image Shadows
Top