1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > html点击按钮弹出悬浮窗_点击文字或按钮弹出一个DIV窗口(DIV悬浮窗口)

html点击按钮弹出悬浮窗_点击文字或按钮弹出一个DIV窗口(DIV悬浮窗口)

时间:2020-07-28 07:53:45

相关推荐

html点击按钮弹出悬浮窗_点击文字或按钮弹出一个DIV窗口(DIV悬浮窗口)

以下是弹出窗口代码:

点击文字弹出一个DIV层窗口代码

.black_overlay{

display: none;

position: absolute;

top: 0%;

left: 0%;

width: 100%;

height: 100%;

background-color: black;

z-index:1001;

-moz-opacity: 0.8;

opacity:.80;

filter: alpha(opacity=88);

}

.white_content {

display: none;

position: absolute;

top: 25%;

left: 25%;

width: 55%;

height: 55%;

padding: 20px;

border: 10px solid orange;

background-color: white;

z-index:1002;

overflow: auto;

}

示例弹出层:请点这里

点这里关闭本窗口

$(function(){

})

function openDialog(){

document.getElementById('light').style.display='block';

document.getElementById('fade').style.display='block'

}

function closeDialog(){

document.getElementById('light').style.display='none';

document.getElementById('fade').style.display='none'

}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。