-1

So i have this site im creating and it has a box in the center of it that when i push continue in the bottom right hand corner I would like the box to disappear and display the site behind it.

How can I do this? I am not a strong coder, but with a little guidance I could probably do it. Thank you all in advance for your help.

I attached a pic in case my explanation wasnt good.( I guess i dont have enough of a reputation to do so) :( Also not sure if i put this question in the right forum...

-Sa!

4

1 に答える 1

2

あなたが説明していることを行う1つの方法を次に示します。

属性div付きのと、次のボタンも必要です。idid

<div id='overlay'><button type='button' id='btncontinue'>Continue</button></div>

次のように CSS でスタイルを設定できます (おそらく):

#overlay {
    background:black;
    height:100%;
    left:0;
    position:absolute;
    top:0;
    width:100%;
    z-index:1000;
}

次のようにオーバーレイを切り替えることができます。

document.getElementById('btncontinue').onclick = function() {
    document.getElementById('overlay').style.display = 'none';
}

キックのために、幅 100% と高さ 100% を取得する興味深い代替方法は次のとおりです。

#overlay {
    background:black;
    bottom:0;
    left:0;
    position:absolute;
    right:0;
    top:0;
    z-index:1000;
}
于 2013-05-20T03:27:48.943 に答える