网页左下角按钮控制窗口可显示与隐藏切换效果

1个月前 (04-06 14:46)阅读41回复0
大陆
大陆
  • 管理员
  • 发消息
  • 注册排名1
  • 经验值4714
  • 级别管理员
  • 主题942
  • 回复2
楼主

在页面的左下角显示有一个按钮,用户可点击按钮后弹出窗口内容,并带隐藏按钮功能,可根据自己的需求来自定义。

<!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>


1
0
收藏0
回帖

网页左下角按钮控制窗口可显示与隐藏切换效果 期待您的回复!

取消
载入表情清单……
载入颜色清单……
插入网络图片

取消确定

图片上传中
编辑器信息
提示信息