<%
@ Page Language
=
"
C#
"
AutoEventWireup
=
"
true
"
CodeFile
=
"
Default.aspx.cs
"
Inherits
=
"
_Default
"
%>
<! 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 runat = " server " >
< title > 无标题页 </ title >
< style type = " text/css " >
#MobileBox{
position:relative;
}
.MobileHidde{
position:absolute;
}
</ style >
< script type = " text/javascript " >
function Closediv1()
{
document.getElementById( " MobileBox1 " ).style.visibility = " hidden " ;
}
function Closediv2()
{
document.getElementById( " MobileBox2 " ).style.visibility = " hidden " ;
}
firstScrollY = - 100 ;
function Play()
{
var scrollY = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
percent = 0.1 * (scrollY - firstScrollY);
if (percent > 0 ) percent = Math.ceil(percent);
else percent = Math.floor(percent);
var MobileBox = document.getElementById( " MobileBox " );
var Mobilelist = MobileBox.getElementsByTagName( " div " );
for (i = 0 ;i < Mobilelist.length;i ++ )
{
if (Mobilelist[i].className.indexOf( " MobileHidde " ) ==- 1 ) continue ;
Mobilelist[i].style.top = parseInt(Mobilelist[i].style.top) + percent + " px " ;
}
firstScrollY = firstScrollY + percent;
}
setInterval( " Play() " , 1 );
</ script >
</ head >
< body style = " width:800px; height:2000px " >
< form id = " form1 " runat = " server " style = " width:800px; height:2000px " >
< div id = " MobileBox " style = " display: block; height:100px; width:40px; " >
< div id = " MobileBox1 " class = " MobileHidde " style = " left: 5px; top: 50px; display: block; " >
< div align = " center " >
< a href = " javascript:Closediv1(); " >< font color = " #009900 " class = " aut " > 关闭 </ font ></ a >
< div style = " width: 20px; height: 30px; background-color: Purple " >
</ div >
</ div >
</ div >
</ div >
</ form >
</ 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 runat = " server " >
< title > 无标题页 </ title >
< style type = " text/css " >
#MobileBox{
position:relative;
}
.MobileHidde{
position:absolute;
}
</ style >
< script type = " text/javascript " >
function Closediv1()
{
document.getElementById( " MobileBox1 " ).style.visibility = " hidden " ;
}
function Closediv2()
{
document.getElementById( " MobileBox2 " ).style.visibility = " hidden " ;
}
firstScrollY = - 100 ;
function Play()
{
var scrollY = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
percent = 0.1 * (scrollY - firstScrollY);
if (percent > 0 ) percent = Math.ceil(percent);
else percent = Math.floor(percent);
var MobileBox = document.getElementById( " MobileBox " );
var Mobilelist = MobileBox.getElementsByTagName( " div " );
for (i = 0 ;i < Mobilelist.length;i ++ )
{
if (Mobilelist[i].className.indexOf( " MobileHidde " ) ==- 1 ) continue ;
Mobilelist[i].style.top = parseInt(Mobilelist[i].style.top) + percent + " px " ;
}
firstScrollY = firstScrollY + percent;
}
setInterval( " Play() " , 1 );
</ script >
</ head >
< body style = " width:800px; height:2000px " >
< form id = " form1 " runat = " server " style = " width:800px; height:2000px " >
< div id = " MobileBox " style = " display: block; height:100px; width:40px; " >
< div id = " MobileBox1 " class = " MobileHidde " style = " left: 5px; top: 50px; display: block; " >
< div align = " center " >
< a href = " javascript:Closediv1(); " >< font color = " #009900 " class = " aut " > 关闭 </ font ></ a >
< div style = " width: 20px; height: 30px; background-color: Purple " >
</ div >
</ div >
</ div >
</ div >
</ form >
</ body >
</ html >