日期:2014-05-16 浏览次数:20335 次
<!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" /> <title>无标题文档</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> //解决ie6.0 的bug function handingIE6(){ if($.browser.msie && $.browser.version=="6.0"){ $("#flowDiv").css({"position":"absolute","right":"10px","z-index":100}); //底部显示 var divBottom = $(window).scrollTop()+$(window).height()-$("#flowDiv").outerHeight(true)-10; $("#flowDiv").animate({top:divBottom},{duration: 400, queue: false }); } } $(function(){ //关闭按钮 $("#btnClose").click(function(){ $("#flowDiv").fadeOut("fast"); }); //左侧点击显示 $("#showFlow").click(function(){ $("#flowDiv").slideDown("slow"); }); //IE6.0 执行代码 if($.browser.msie && $.browser.version=="6.0"){ handingIE6(); }else{ $("#flowDiv").css({"position":"fixed","right":"10px","bottom":"10px","z-index":100}); } //显示浮动层 $("#flowDiv").slideDown("slow"); //ie6.0 运行 $(window).scroll(function(){handingIE6();}).resize(function(){handingIE6();}); }) </script> <style type="text/css"> #flowDiv{ width:250px; overflow:hidden; border:solid 1px green; font-size:13px; display:none;} #flowTitle{padding:3px 5px; height:20px; line-height:20px; background:#FFDD55; border-bottom:solid 1px green; } #flowContent{height:100px; padding:5px; background:#E0F7FF;} </style> </head> <body> <div id="flowDiv"> <div id="flowTitle"><span style="float:left">标题</span><span id="btnClose" style="float:right; cursor:pointer"> x </span></div> <div id="flowContent">内容</div> </div> <p id="showFlow" style="height:1500px; padding:10px; width:17px; cursor:pointer; background:#99AFC4; te">点击显示弹出层</p> </body> </html>
<!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" /> <title>无标题文档</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> //解决ie6.0 的bug function handingIE6(){ if($.browser.msie && $.browser.version=="6.0"){ $("#flowDiv").css({"position":"absolute","right":"10px","z-index"