You can drag the layer code to close it.

Source: Internet
Author: User

<Style type = "text/CSS">
# Netmoer {background-color: #000000; Height: 700px; width: 1000px; position: absolute; left: 0px; top: 0px ;}
# Netmoera {border: 1px solid #666666; margin-top: 1px; Background-color: # ffffff; position: absolute;
Height: 600px; width: 800px; float: Left ;}
. Netmoeratitle {padding: 0px 10px 0px 10px; border-bottom: 1px solid # eeeeee; line-Height: 30px; Height: 30px; color: #000000; font-weight: bold; font-size: 16px; cursor: move ;}
. Netmoerainfo {Height: 100%; width: 100%; margin-top: 0px; padding: 10px ;}
. Netshubiao {cursor: pointer; text-Decoration: underline ;}
</Style>
</Head>
<Body>
<Div id = "bodyl">
<A class = "netshubiao" onclick = "show ('netmoer'); Return false;">
[Website announcement] </a>
<A href = "#" class = "OD" onclick = "closeed ('netmoer'); Return false;">
</A>
</Div>

<! -- Service start -->
<Div id = "netmoer" style = "display: none; filter: alpha (opacity = 90);-moz-opacity: 0.90; opacity: 0.90;">
<Div id = "netmoera" class = "netmorebox" style = "Left: 10%; top: 10%;">
<Div class = "netmoeratitle"> <span style = "float: Left"> click and drag </span> <span style = "float: Right; margin-top: 5px; "> <input onclick =" closeed ('netmoer'); Return false; "type =" button "value =" close "/> </span>
</Div>
<Div class = "netmoerainfo">
<IFRAME marginwidth = "0" marginheight = "0" Height = "100%" width = "100%" scrolling = "no" align = "center" border = "0" frameborder =" 0 "src =" http://www.sjg8.com/shop/ ">
</Iframe>
</Div>
</Div>
</Div>
<! -- Service completion -->
<SCRIPT type = "text/JavaScript">
VaR prox;
VaR proy;
VaR proxc;
VaR proyc;
Function show (ID) {/* -- open --*/
Clearinterval (prox );
Clearinterval (proy );
Clearinterval (proxc );
Clearinterval (proyc );
VaR o = Document. getelementbyid (ID );
O. style. Display = "Block ";
O. style. Length = "100% ";
O. style. Height = "100% ";
Prox = setinterval (function () {openx (O, 1000)}, 10 );
}
Function openx (O, x) {/* -- open X --*/
VaR Cx = parseint (O. style. width );
If (CX <X)
{
O. style. width = (cx + math. Ceil (X-cx)/5) + "PX ";
}
Else
{
Clearinterval (prox );
Proy = setinterval (function () {openy (O, 700)}, 10 );
}
}
Function openy (O, Y) {/* -- open y --*/
VaR Cy = parseint (O. style. Height );
If (CY <Y)
{
O. style. Height = (CY + math. Ceil (Y-cy)/5) + "PX ";
}
Else
{
Clearinterval (proy );
}
}
Function closeed (ID) {/* -- disable --*/
Clearinterval (prox );
Clearinterval (proy );
Clearinterval (proxc );
Clearinterval (proyc );
VaR o = Document. getelementbyid (ID );
If (O. style. Display = "Block ")
{
Proyc = setinterval (function () {closey (o)}, 10 );
}
}
Function closey (o) {/* -- open y --*/
VaR Cy = parseint (O. style. Height );
If (CY> 0)
{
O. style. Height = (Cy-math. Ceil (CY/5) + "PX ";
}
Else
{
Clearinterval (proyc );
Proxc = setinterval (function () {closex (o)}, 10 );
}
}
Function closex (o) {/* -- open X --*/
VaR Cx = parseint (O. style. width );
If (CX> 0)
{
O. style. width = (CX-math. Ceil (CX/5) + "PX ";
}
Else
{
Clearinterval (proxc );
O. style. Display = "NONE ";
}
}

/* = */
VaR Ie = Document. All;
VaR nn6 = Document. getelementbyid &&! Document. All;
VaR isdrag = false;
Var y, X;
VaR odragobj;

Function movemouse (e ){
If (isdrag ){
Odragobj. style. Top = (nn6? Nty + E. clienty-Y: nty + event. clienty-y) + "PX ";
Odragobj. style. Left = (nn6? NTX + E. clientx-X: NTX + event. clientx-x) + "PX ";
Return false;
}
}

function initdrag (e) {
var odraghandle = nn6? E.tar get: event. srcelement;
var topelement = "html";
while (odraghandle. tagname! = Topelement & odraghandle. classname! = "Netmorebox") {
odraghandle = nn6? Odraghandle. parentnode: odraghandle. parentelement;
}< br> If (odraghandle. classname = "netmorebox") {
isdrag = true;
odragobj = odraghandle;
nty = parseint (odragobj. style. top + 0);
Y = nn6? E. clienty: event. clienty;
NTX = parseint (odragobj. style. Left + 0);
X = nn6? E. clientx: event. clientx;
document. onmousemove = movemouse;
return false;
}< BR >}< br> document. onmousedown = initdrag;
document. onmouseup = new function ("isdrag = false");

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.