Feb
17
17
Quick Demo: CSS3 Fancy Avatar
![]()
Now I started using jsfiddle for code snippets so I can show the code AND the actual results on browsers.
This fancy avatar frame is created pretty easily by using CSS box-shadow inset values.
Basically, what I did is that giving a div container (with an avatar picture as a background image) an inset shadow to bottom/right, and glare to top/left. Oh and added border-radius for the rounded corners.
This works without the vendor-specific extensions on latest Firefox, Chrome, Webkit Nightly, and Opera. Safari 5 still requires -webkit extension to make the box-shadow work.
Really easy and practical!
Tags: css3












[...] This post was mentioned on Twitter by john Allsopp, Tomomi Imura. Tomomi Imura said: [GirlieMac! blog] Creating a fancy avatar frame with #CSS3 is quick and easy! http://bit.ly/emHgW3 [...]