特效描述:利用js实现 右下角 悬浮提示框。利用js实现右下角悬浮提示框代码
代码结构
1. HTML代码
.popBtn{width:18px; height:18px; cursor:pointer; float:right; margin-left:1px; margin-top:12px; display:inline; background:url(buttons.png) no-repeat;}
.popClose{margin-right:10px; width:15px; background-position:-39px 0}
.popClose:hover{background-position:-39px -20px}
.popShow{background-position:0px 0}
.popShow:hover{background-position:0px -20px}
.popHide{background-position:-19px 0}
.popHide:hover{background-position:-19px -20px}
function showDiv(innerCall){
if(document.getElementById('PcPoPmarket')==null)return;
document.getElementById('PcPoPmarket').style.width = 350+'px';
document.getElementById('PcPoPmarket').style.height = 238+'px';
document.getElementById('showvod').style.display = 'none';
document.getElementById('hidevod').style.display = 'block';
var lmt = document.getElementById('popFrame').contentWindow.document.getElementById('lmt');
if(lmt!=null){
lmt.style.backgroundImage = 'url(bg_open.png)';
}
}
function hideDiv(innerCall){
if(document.getElementById('PcPoPmarket')==null)return;
document.getElementById('PcPoPmarket').style.width = 226 + 'px';
document.getElementById('PcPoPmarket').style.height = 37 + 'px';
document.getElementById('hidevod').style.display = 'none';
document.getElementById('showvod').style.display = 'block';
var lmt = document.getElementById('popFrame').contentWindow.document.getElementById('lmt');
if(lmt!=null){
lmt.style.backgroundImage = 'url(bg_min.png)';
}
}
function closeDiv(innerCall){
if(document.getElementById('PcPoPmarket')==null)return;
document.getElementById('PcPoPmarket').style.display = 'none';
}
-