我想创建对话框 [英] i want to create dialogbox
本文介绍了我想创建对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
http://www.clubmahindra.com/
在上面的行中,当我打开此网站时...在对话框中打开...在后页中看起来像透明纸,如何创建这种类型的Dialobox ....
等当我单击反馈按钮上的其他对话框时,如何打开此对话框,请帮我
http://www.clubmahindra.com/
in the above line when i am opening this website ...dialog box open ...in the backside page look like transparents how to create this type dialobox....
and other when i was clicked on feedback button other dialog open how to di this please help me
推荐答案
尝试"div class ="overlay"来做到这一点:
try "div class="overlay" to do this as :
var gab = document.createElement('div');
gab.setAttribute('id', 'OVER');
gab.innerHTML='<div class="overlay"><h1>hello</h1></div>';
document.body.appendChild(gab);
使用CSS类,如
use a CSS class like
#OVER{width:100%; height:100%; left:0;/*IE*/ top:0; text-align:center; z-index:5; position:fixed; background-color:#fff;}
.overlay {width:100%; z-index:6; left:0;/*IE*/ top:30%; font-color:#cdcdcd; font-size:0.8em; text-align:center; position:fixed; background-color:#000;}
您也可以使用简单的div来创建此效果.
1.创建一个宽度和高度与页面相同的div1.
2.将弹出式窗口放入div2.
3.设置div的z-index,使弹出div2在div1上方.
4.将不透明度设置为div1的50%.
5.使所有这些div在页面加载中可见.
代码示例:
div1代码:
Hi,
You can create this effect using simple divs as well.
1.Create a div1 with width and height same as your page.
2.Put your popup in a div2.
3.Set your z-index of div such that the popup div2 is above the div1.
4.Set the opacity,filter to 50% for the div1.
5.Make all this divs visible in your page load.
Code samples:
div1 code:
<div id="screenhide" visible="false" runat="server" style="background-color:#fff;width:100%; height:100%; position: absolute; top:0; left:0; z-index: 5;opacity:0.8;filter:alpha(opacity=80)">
</div>
希望对您有所帮助.
Hope this helps.
请参阅下面的链接
它将帮助您
链接1 [链接2 [
see below Link
It will help you
Link 1[^]
Link 2[^]
这篇关于我想创建对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文