Proposing: Feature Spotlight
Let's say you want to highlight a feature on the map, e.g. a user has searched for a landmark, typically one would place a marker on the map and zoom to that location. The downside is that the user still needs to 'search' for the visual clue (the marker) on the map.
I think the missing link here is to 'black out' the whole map and only highlighting the area surrounding the landmark. This provides a natural focus on the feature and is a really elegant alternative I believe.
Optionally one could use the modal area to add a description or even photos (get creative for yourself). And yes, leave the marker also for browsers that don't support CSS3.
The code is as simple as could be, here is the CSS class called 'spotlight':
.spotlight { display: block; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; z-index: 100; border: 0; pointer-events: none; /* this is the sweet spot */ background-image: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 100, from(rgba(0,0,0,0)), to (rgba(0,0,0,0.8)), color-stop(0.8, rgba(0,0,0,0))); background-image: -moz-radial-gradient(50% 50% 45deg,circle closest-side,transparent 0,transparent 100px,rgba(0, 0, 0, 0.8) 120px); } |
And here the HTML defining the spotlight container:
<span id="spot" class="spotlight"></span> |
Implementation inspired by CSS3 Spotlight.
Highlights of Week 07/2010
- The Skinny on CSS Attribute Selectors (by Chris Coyier) - CSS attribute selectors are really useful and I've been using them for ages; here a nice summary by Chris.
- Common Misconceptions about Web Designers (by Shannon Noack) - working odd hours? When was the last time I've seen day-light?
- CSS files downloaded twice in Internet Explorer with protocol relative URLs (by Robert Nyman) - and Robert gives three nice (and trivial) examples on how to avoid it.
- Create a Clean and Professional Web Design in Photoshop (by Waheed Akhtar) - Step-by-step guide for Photoshop geeks. Really basic but a nice start.
- Is Web accessibility a human right? (by Vlad Alexander) - excellent article; and Ian Pouncey's response: Accessibility is a human right.
- How to Make Your Small Business Geolocation-Ready (by Leah Betancourt) - jump on the train of geographically optimized interaction!
- The Browser Choice Screen for Europe: What to Expect, When to Expect It (by Dave Heiner) - Microsoft finally bowed to pressure by the EU (better late than never).
- 25 Beautiful Examples of “Coming Soon” Pages (by Tyler Denis) - get inspired; and Walter offers similar A Collection of “Coming Soon” Web Pages




