跟随网页浮动层效果代码
在网上找到不少用js写的。这个用css写的,在别人网站上找到,把内容精简了
<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="Default.aspx.cs"Inherits="test_Default"%>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">
<title>无标题页-CSS实例教程:跟随网页浮动层效果代码-http://www.web2bar.cn</title>
<styletype="text/css">
#sticky_footer
{
width:100%;
background-color:#eee;
opacity:.8;
filter:alpha(opacity=80);
-moz-opacity:0.8;
position:fixed;
_position:absolute;
overflow:hidden;
height:38px;
bottom:0;
z-index:99999;
line-height:38px;
float:left;
_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));
}
#wrapperfooter{width:960px;margin:0auto;border-top:0px#e5e5e5solid;padding:0;}
</style>
</head>
<body>
<formid="form1"runat="server">
<divstyle="height:900px;background-color:Blue">
</div>
<divstyle="height:90px;">
</div>
<divid="sticky_footer">
<divid="wrapperfooter">
在网上找到不少用js写的。这个用css写的,在别人网站上找到,把内容精简了
</div>
</div>
</form>
</body>
</html>