Zachary Johnson has put together another fun demo. He’s using some JavaScript and the new text-shadow property to build a spotlight effect. It’s embedded below. If you can’t view it, click through to his post.
@mozhacks on twitter
- Vlad talks about our first steps in investigating Firefox for Android Phones: http://bit.ly/7iq88F 1 day ago
- The File API spec by Mozilla's own @arun is an easy read. Most of it will be in Firefox 3.6: http://bit.ly/3CGKPp 4 days ago
- web developer survey - now closed with 5000+ responses from 119 countries - http://bit.ly/1suI0j - thanks to everyone who helped! 5 days ago
- @RebeccaRipple There are a lot of free fonts out there, too. Check out fontsquirrel and several other sites that have them. in reply to RebeccaRipple 5 days ago
- @trygve_lie Yeah, but with a different goal - no signing required here and this is about perf not permissions. in reply to trygve_lie 5 days ago
- More updates...
Links
Translations
Recent Posts
- web developer survey: 5,000+ responses from 119 countries!
- what’s new in Firebug 1.5?
- a proposal: resource packages to improve performance
- web developer survey update – help wanted!
- 5 years of Firefox
- two important api changes – CSS gradients and the media load event
- Firefox 3.6 Beta 1 now available – what’s new for web developers
- help build the mozilla developer network
- font_dragr: a drag and drop preview tool for fonts
- after Firefox 3.6 – new font control features for designers
Categories
- 35 Days (45)
- @font-face (7)
- Audio (4)
- Canvas (11)
- CSS (28)
- Debugging (1)
- Demo (35)
- Device APIs (1)
- DOM (9)
- Drag and Drop (1)
- Feature (28)
- Firebug (1)
- Firefox (8)
- Firefox 3.5 (45)
- Firefox 3.6 (6)
- Geolocation (3)
- Images (2)
- JavaScript (24)
- MDN (3)
- Multi-touch (2)
- Performance (1)
- Security (1)
- Standards (18)
- Survey (1)
- SVG (7)
- TraceMonkey (4)
- Uncategorized (3)
- Video (14)
- WebGL (3)
- XMLHttpRequest (3)


Hihi, I’m feeling like a little child again: That was one of the first Java applets that I had seen years and years ago and now we can do it so easily in the browser.
Thanks, Zach!
When will he be able to use a css gradient instead of a png for the spotlight effect?
Maybe we already are… I haven’t looked into this in a while:
Apply a CSS filter that references a graident filled SVG element as image. Since feImage should behave like “use” it should be possible to apply it that way.
thinsoldier, it would be awesome if we had -moz-mask and/or -moz-gradient CSS so that the spotlight could be pure CSS instead of a PNG.
On a side note, if you are using Firefox 3.0.11 you are seeing the spotlight but missing the shadow. Try out Firefox 3.5!
An idea for pure-CSS spotlight, sketched out with actual implementation left as an exercise for the reader: inset box-shadow and border-radius. I look forward to someone else doing the actual legwork.
Nice demo.
Christopher, you could change:
document.getElementById(’text-shadow-box’).onmousemove = onMouseMove;
to
window.addEventListener(”mousemove”, …);
so the effect works when mouse is out of frame.