How to make this webpage effect?

BitByBit

Senior member
Jan 2, 2005
474
2
81
I see no reason why this couldn't be done with DHTML. In that case, it would be simply a matter of assigning event handlers to the onclick event.

Something like this perhaps:

function changeBG () {
document.body.style.backgroundColor = 'gray';
}

...

<a href="#" onclick="changeBG()">Sign In</a>

As for the sign-in box, that would involve setting the visibility parameter of the particular form element to visible from hidden.
 

esun

Platinum Member
Nov 12, 2001
2,214
0
0
It's not just the background color that grays, it's the entire screen. You'd need some other code for that part. I can almost guarantee you can find such code online, though.
 

BitByBit

Senior member
Jan 2, 2005
474
2
81
Actually it looks like nothing more than a partially transparent layer overlayed over the welcome page, whose visibility property is initially set to hidden. When the user clicks the links, its visibility property gets set to visible, and the uppermost layer becomes visible. Nice design.
 

TheStu

Moderator<br>Mobile Devices & Gadgets
Moderator
Sep 15, 2004
12,089
45
91
That reminds me of the design on iusethis.com. when you select to view a screenshot, the page dims, a small white square appears and then stretches itself, first vertically then horizontally to display the image. Very cool design if you ask me.
 

bchalker

Golden Member
Feb 17, 2000
1,204
0
0
It's a "Lightbox" effect and can be VERY effective when used properly. Check out jQuery (www.jquery.com) and some of the Plugins available. It's a free (and powerful) Javascript library you can use, and you'll probably find yourself using it for more than the Lightbox (or Thickbox, etc.).