CSS3D creates a stereoscopic 3D effect with CSS3 only. First I just created this red and cyan effect because I thought it looks cool. But then I got some 3D glasses and was shocked that it actually works. Basically you just need one line of CSS. A text-shadow with a red and cyan offset. The trick is to use “em“s for the text-shadows. That way, if you change the font-size, the text-shadows change in the same proportion.

text-shadow: -0.06em 0 red, 0.06em 0 cyan;

See the demo.

Note: Actually you are not limited to text only. You can use the same technique with box-shadows. It even works when you add 3D transforms like rotateY.

Update: Wow! I submitted this to Smashing Magazine’s CSS3 Design Contest and it made it on 3rd place, which makes me incredible happy. Thanks!

  1. webhazard reblogged this from simurai
  2. onwardstoengland reblogged this from bonbori
  3. barfofrage reblogged this from simonist
  4. heliumflavoured reblogged this from dissectr
  5. lakeinyoureyes reblogged this from bonbori
  6. noneedtoexplain reblogged this from lemonyellowribbon
  7. lemonyellowribbon reblogged this from simonist
  8. randomono reblogged this from dissectr
  9. bonbori reblogged this from dissectr
  10. dissectr reblogged this from simonist
  11. mlmcrae reblogged this from simonist
  12. tealisque reblogged this from simonist
  13. psychid reblogged this from athenability
  14. cakeisdead reblogged this from simurai
  15. semendeev reblogged this from simurai
  16. kidapu reblogged this from simurai
  17. simurai posted this
simurai simurai

I’m a UIX Designer and like to experiment with CSS3. This site is my personal playground.

About
Contact