I was wondering on how this effect is created in certain webpages :
On loading the webpage, a banner ad with a close button is displayed as the topmost layer, and the actual webpage is displayed as the lower layer; the webpage being completely dimmed out, so that the focus of attention naturally falls on the banner ad with close button. And on clicking this close button in the ad, the actual webpage is displayed immediately, but now, back to its original brightness.
Well, that was just an example, I know such practices of displaying ads are irksome.
And my question here is - How do you get that dim-and-bright effect on your webpage?
PS:
- I know about the z-index in css, so I just need to know the dimming part.
- I'm looking for a css based solution (or rephrasing that, solution without the use of any scripting like js), if its possible.
Thanks guys.