jsp中可以利用div+css来实现dialog弹出:
CSS代码如下:
#div
{
position:absolute;
left:0;
right:0;
top:0;
bottom:0;
z-index:999;
}
#div .layer
{
position:absolute;
left:0;
right:0;
top:0;
bottom:0;
z-index:1000;
background: gray;
filter:alpha(opacity=60);
-moz-opacity: 0.6; /*Firefox私有,透明度50%*/
opacity: 0.6; /*其他,透明度50%*/
}
#div #center
{
position: absolute;
left: 200px;
right: 200px;
top: 70px;
bottom: 400px;
width:170px;
background:rgb(255,255,255);
margin:100px auto;
padding:60px 100px 100px 100px;
z-index: 1001;
}
DIV代码如下:
<div id="div" style="display:none">
<div class="layer">
</div>
<div id="center">
点我弹出:
</div>
</div>
温馨提示:内容为网友见解,仅供参考