And for a final little nugget of font goodness,

Zach Johnson is at it again, this time giving us a fun Friday treat with CSS text shadow, all via:

  1. document.getElementById('text-shadow-box').onmousemove = function(e) {
  2. var xm = e.clientX - 300;
  3. var ym = e.clientY - 175;
  4. var d = Math.sqrt(xm*xm + ym*ym);
  5. text.style.textShadow = -xm + 'px ' + -ym + 'px ' + (d / 5 + 10) + 'px black';
  6. xm = e.clientX - 600;
  7. ym = e.clientY - 450;
  8. spot.style.backgroundPosition = xm + 'px ' + ym + 'px';
  9. }

If you have better solution, just tell me !

0 comments: