How do I use javascript to black out all content except a single html element?
This is Chrome-specific app so CSS3 can be used.
How do I use javascript to black out all content except a single html element?
This is Chrome-specific app so CSS3 can be used.
You could iterate through all the elements of a document and set their background color to black, except the one with a certain ID.
You don't need CSS3 for this at all.
Use one <div>
with position: fixed;
that covers the page, with something like background-color: rgba(0, 0, 0, .5);
, then simply place the element you wish to show on top of that.