Thunder's flash image slide code

Source: Internet
Author: User

<! 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 = UTF-8"/>
<Title> untitled document </title>
<Style>
. Flashnews,. smallbox {position: relative; float: Left; width: 304px; margin-bottom: 12px; overflow: hidden; Border: 1px solid # b6cae3 ;}
. Firstnews,. mediumbox {position: relative; float: Right; width: 434px; margin-bottom: 12px; overflow: hidden; Border: 1px solid # b6cae3 ;}

. Flashnews,. smallbox {position: relative; float: Left; width: 304px; margin-bottom: 12px; overflow: hidden; Border: 1px solid # b6cae3 ;}


. Flashnews,. firstnews {Height: 270px ;}
. Flashnews. BG {position: absolute; left: 0; bottom: 0; width: 304px; Height: 73px; Background: #000000; filter: alpha (opacity = 39 ); -Moz-opacity: 0.39; opacity: 0.39 ;}
. Flashnews H3 {position: absolute; left: 10px; top: 200px; width: 284px; Height: 35px; line-Height: 35px; Z-index: 2 ;}
. Flashnews H3 A {font-size: 20px; font-family: ""; font-weight: normal; color: # ffffff ;}
. Flashnews H3 A: hover {color: # f20000 ;}
. Flashnews P {position: absolute; left: 10px; top: 230px; width: 284px; Height: 20px; line-Height: 20px; Z-index: 2 ;}
. Flashnews p a {color: # ffffff ;}
. Flashnews p a: hover {color: # f20000 ;}
. Flashnews ul {position: absolute; Right: 0; bottom: 0; padding-left: 47px; _ padding-left: 46px; Background: URL (.. /img/flashpage_bg.png) 0 0 no-Repeat; Z-index: 2; _ Background: none; _ filter: progid: DXImageTransform. microsoft. alphaimageloader (src = 'img/flashpage_bg.png ', sizingmethod = 'crop ')}
. Flashnews ul Li {float: Left; width: 15px; Height: 18px; line-Height: 18px; text-align: center; margin-left: 1px; Background: #000000 ;}
. Flashnews ul Li a {display: block; width: 15px; Height: 18px; font-size: 10px; font-family: tahoma; font-weight: bold; color: # ffffff ;}
. Flashnews ul Li A: hover,. flashnews ul Li A. Sel {color: # f20000 ;}

. Firstnews H3 {width: 432px; Height: 27px; line-Height: 27px; text-indent: 14px; font-size: 12px; Border: 1px solid # ffffff; Background: # f2f6fb ;}
. Firstnews P {position: absolute; top: 5px; Right: 5px ;}
. Firstnews p a {font-size: 12px ;}
. Firstnews H4 {width: 410px; Height: 25px; margin: 0 auto; overflow: hidden; padding-top: 12px; line-Height: 25px; font-weight: normal; font-size: 18px; font-family: "";}
. Firstnews ul {width: pixel PX; Height: auto; overflow: hidden; _ ZOOM: 1; margin: 0 0 0 12px ;}
. Firstnews ul Li {position: relative; width: pixel PX; Height: 22px; line-Height: 22px; overflow: hidden; text-indent: 10px; font-size: 14px; Background: URL (.. /img/pic_new.gif)-298px-141px no-Repeat ;}


</Style>
<SCRIPT>

VaR maxscreen = 4;
VaR curscreen = 1;


Function switchpic (screen ){
If (screen> maxscreen ){
Screen = 1;
}

For (I = 1; I <= maxscreen; I ++ ){
// Alert (I );
Document. getelementbyid ("Switch _" + I). style. Display = "NONE ";
}
Document. getelementbyid ("Switch _" + screen). style. Display = "Block ";
Showswitchnav (screen );
Showswitchtitle (screen );
// Effect. appear ("Switch _" + screen );

// Switchlittlepic (screen );
// Showswitchtitles (screen );
Curscreen = screen;
}
Function showswitchnav (screen ){
VaR navstr = "";
For (I = 1; I <= maxscreen; I ++ ){
If (I = screen ){
Navstr + = '<li onmouseover = "pauseswitch ();" onmouseout = "goonswitch ();"> <a href = "javascript: // "target =" _ Self "class =" Sel "> '+ I +' </a> </LI> ';
}
Else {
Navstr + = '<li onmouseover = "pauseswitch ();" onmouseout = "goonswitch ();" onclick = "gomanswitch (' + I + '); "> <a href =" javascript: // "target =" _ Self "> '+ I +' </a> </LI> ';
}

}
Document. getelementbyid ("switchnav"). innerhtml = navstr;
}
Function showswitchtitle (screen ){
VaR titlestr = "";
Titlestr = 'Document. getelementbyid ("switchtitle"). innerhtml = titlestr;
}
Function reswitchpic (){
Refreshswitchtimer = NULL;
Switchpic (curscreen + 1 );
Refreshswitchtimer = setTimeout ('reswitchpic (); ', 3000 );
}
Function pauseswitch (){
Cleartimeout (refreshswitchtimer );
}
Function goonswitch (){
Cleartimeout (refreshswitchtimer );
Refreshswitchtimer = setTimeout ('reswitchpic (); ', 3000 );
}
Function gomanswitch (INDEX ){
Cleartimeout (refreshswitchtimer );

Curscreen = index-1;
Reswitchpic ();
}
</SCRIPT>
</Head>

<Body>


<Div class = "flashnews">
<Div id = "switch_1">
<A href = "http://ent.xunlei.com/star/contents/f0/376591.shtml" blockid = "1121">
</a>
</Div>

<Div id = "switch_2" style = "display: none;">
<A href = "http://ent.xunlei.com/star/contents/99/376648.shtml" blockid = "1121">
</a>
</Div>
<Div id = "switch_3" style = "display: none;">
<A href = "http://ent.xunlei.com/star/contents/f9/376406.shtml" blockid = "1121">
</a>
</Div>

<Div id = "switch_4" style = "display: none;">
<A href = "http://movie.xunlei.com/" blockid = "1121">

</A>
</Div>



<Div id = "switchtitle" onmouseover = "pauseswitch ();" onmouseout = "goonswitch ();"> </div>
<Ul id = "switchnav">
</Ul>
<Div class = "BG" onmouseover = "pauseswitch ();" onmouseout = "goonswitch ();"> </div>
</Div>


<SCRIPT type = "text/JavaScript">
VaR switcher = new array ();
Switcher [1] = array ();
Switcher [1] ['title'] = "Chen qizhen sing for the first time ";
Switcher [1] ['stitle'] = "sidu security is not enough ";
Switcher [1] ['link'] = "http://ent.xunlei.com/star/contents/f0/376591.shtml ";
Switcher [2] = array ();
Switcher [2] ['title'] = "Pete Julie on the red carpet ";
Switcher [2] ['stitle'] = "close cooperation with love and envy ";
Switcher [2] ['link'] = "http://ent.xunlei.com/star/contents/99/376648.shtml ";
Switcher [3] = array ();
Switcher [3] ['title'] = "Li Bingbing promotes the success of a new book ";
Switcher [3] ['stitle'] = "fresh dress up in Qingdao ";
Switcher [3] ['link'] = "http://ent.xunlei.com/star/contents/f9/376406.shtml ";
Switcher [4] = array ();
Switcher [4] ['title'] = "Zhou runfa of the seven dragon beads changed to the turtle fairy ";
Switcher [4] ['stitle'] = "The Legend of X-Dragon's appearance is amazing ";
Switcher [4] ['link'] = "http://movie.xunlei.com /";


VaR refreshswitchtimer = NULL;
Switchpic (curscreen );
Refreshswitchtimer = setTimeout ('reswitchpic (); ', 3000 );
</SCRIPT>

</Body>
</Html>

Related Article

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.