4 ms·
Ask YC: How does facebook round corners on users' pictures?
My initial guess would be Jscript. Although it could also be done using a transparent image over the users picture
- nirmal 17y agoThey use the CSS Sprite technique to overlay a certain portion of this image http://static.ak.fbcdn.net/images/ui/UIRoundedImage.png http://static.ak.fbcdn.net/images/ui/UIRoundedImage.png on top of your picture. It's hard to see in the browser but above the blue rounded corner mask there is a white corner mask.
- mcav 17y agohttp://static.ak.fbcdn.net/images/ui/UIRoundedImage.png http://static.ak.fbcdn.net/images/ui/UIRoundedImage.png They overlay that image on top.
- jmtulloss 17y agoAs you can see, this question has been answered, but in the future you should consider using Firebug (http://getfirebug.com/ http://getfirebug.com/). With firebug, you can inspect any element on a web page and see exactly how things are done. I've learned all sorts of tricks this way.
- nirmal 17y agoAnd if you're a Safari user, you can just right-click on something and choose "Inspect Element".
- mindhacker 17y agoThe question has been answered already but if you'd like to see it for yourself, you can right click on the image and hit "View Background Image".
- talleyrand 17y agoHere's a good tutorial on the technique: http://cssglobe.com/post/3714/css-sprites-rounded-corners/ http://cssglobe.com/post/3714/css-sprites-rounded-corners/