图层定位网页左侧跟随页面悬浮滚动

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

图层窗口悬浮定位在网页指定位置,这个图层悬浮特效的兼容性还不错,用户点击后后弹出图层信息。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://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">
body{text-align:center;font-size:12px;color:#333;font-family:"宋体";background:#fff;margin:0 auto;padding:0;}
body > div{text-align:center;margin-right:auto;margin-left:auto;}
div,form,ul,ol,li,span,p,dt,dd,dl{border:0;margin:0;padding:0;}
img,a img{border:0;margin:0;padding:0;}
h1,h2,h3,h4,h5,h6{font-size:12px;font-weight:400;margin:0;padding:0;}
ul,ol,li{list-style:none;}
td{word-break:break-all;}
a{color:#003cc8;text-decoration:none;}
a:hover{text-decoration:none;}
.f_tahoma{font-family:Tahoma;}
em,i{font-style:normal;}
.asp_wuming_ren{overflow:hidden;position:fixed;left:0px;top:200px;z-index:2;}
.left_wuming{background:red;width:20px;height:80px;text-align:center;line-height:20px;display:block;color:#fff;}
.content{background:#999;width:800px;height:2000px;margin:0 auto;}
* html,* html body/*修正IE6振动bug*/{background-image:url(about:blank);background-attachment:fixed;}
.asp_wuming_ren{_position:absolute;_bottom:auto;_left:0;_top: expression(documentElement.scrollTop + 200 + "px");}
.page{width:0px; position:absolute;height:0px;left:0;top:0px;z-index:1;overflow:hidden;display:none;}
.page div{border:1px solid #000;overflow:hidden;width:398px;}
.page h1{height:40px;text-align:center;font-size:20px;color:#fff;background:red;line-height:40px;}
.page h1 a{float:right;color:#000;margin-top:-15px;}
.page p{padding:10px;line-height:22px;font-size:14px;text-align:left;background:#fff;height:400px;width:378px;}
</style>
<script type="text/javascript" src="/img/jquery_last.js"></script>
<script language="javascript">
$(function(){
$("#clickopen").click(function(){
var offset=$("#clickopen").offset().top;
$("#page").css("top",offset+"px");
$("#clickopen").hide();
$("#page").animate({ 
    width: "400px",
    height: "400px",
left: ($("body").width()/2-200)+"px",
top: (offset-100)+"px",
opacity: 'toggle'
  }, 300 );
return false;
})
$("#closepage").click(function(){
var offset=$("#page").offset().top;
$("#page").animate({ 
    width: "0px",
    height: "0px",
left: "0px",
top: (offset+100)+"px",
opacity: 'toggle'
  }, 300 );
$("#clickopen").show();
return false;
})
})//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
</script>
</head>
<body>
<div class="asp_wuming_ren">
<a class="left_wuming" href="#" id="clickopen">武鸣人</a>
</div>
<div class="content"><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>
需要加载js文件,请刷新页面后看效果!</div>
<div class="page" id="page">
<div>
<h1><a href="#" id="closepage">X</a>武鸣人调查页面</h1>
<p>武鸣人,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码!</p>
</div>
</div>
</body>
</html>


0
0
收藏0
回帖

图层定位网页左侧跟随页面悬浮滚动 期待您的回复!

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

取消确定

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