在页面的左下角显示有一个按钮,用户可点击按钮后弹出窗口内容,并带隐藏按钮功能,可根据自己的需求来自定义。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-Type" content="text/html;charset=gb2312"> <meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren"> <meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。"> <title>网页左下角按钮控制窗口可显示与隐藏切换效果_武鸣人</title> <style type="text/css"> html,body{ width:100%; height:100%; /*overflow-x:hidden !important; overflow-y:hidden !important; overflow:visible !important;*/ overflow:hidden; margin:0; padding:0; } div#fix { position:relative; width:100%; height:100%; overflow-x:auto; overflow-y:scroll; background:#fff; cursor:default; } #wuming_ren{ text-align:center; margin:0; padding:0; position:absolute; z-index:9999; left:0; bottom:0px; width:50px; height:20px; background:red; } a{ color:white; text-decoration:none; } </style> <script type="text/javascript"> var timeout; function movediv(){ clearTimeout(timeout); var www_wuming_ren = document.getElementById("www_wuming_ren"); var currentPosition = parseInt(www_wuming_ren.style.bottom); if(currentPosition >= 0) downdiv(); else updiv(); }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) function updiv(){ clearTimeout(timeout); var www_wuming_ren = document.getElementById("www_wuming_ren"); var currentPosition = parseInt(www_wuming_ren.style.bottom); if(currentPosition<0) { currentPosition+=3; www_wuming_ren.style.bottom = currentPosition+"px"; timeout = setTimeout("updiv()",10); } }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) function downdiv(){ clearTimeout(timeout); var www_wuming_ren = document.getElementById("www_wuming_ren"); var currentPosition = parseInt(www_wuming_ren.style.bottom); if(currentPosition>-160) { currentPosition-=3; www_wuming_ren.style.bottom = currentPosition+"px"; timeout = setTimeout("downdiv()",10); } }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) </script> </head> <body> <a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> <div id="wuming_ren"><a href="#" onclick="movediv();return false;">显示</a></div> <div id="www_wuming_ren" style="text-align:center;position:absolute;width:50px;height:100px;left:0;z-index:999;bottom:-160px;border:1px solid blue;background:#4D62B1"><a href="#" onclick="downdiv();return false;">隐藏</a><br />一号<br/>二号<br />三号<br/>四号</div> </body> </html>
本文来自武鸣人网站,转载请注明出处