Website--Cyclic picture switching effect (recently done website, already fast fried)

Source: Internet
Author: User

Take a look at the effect

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<meta http-equiv= "Content-language" content= "Utf-8"/>
<meta name= "Author" content= "Rainoxu"/>
<title>flash Slideshow Picture Toggle Effect </title>
<body>
<style type = "Text/css" >
/* <! [cdata[*/
ul,li{
padding:0;
margin:0;
List-style:none;
}
#flashBox {
width:326px;
height:300px;
border:1px solid #EEE;
position:relative;
}
#flashBox img{
/* Initially do not show */
Display:none;
/* Use a border to make the vacancy, because margin and paading sometimes cause some trouble */
BORDER:3PX solid #FFF;
}
#flashBox ul{
Position:absolute;
right:7px;
bottom:9px;
FONT:9PX Tahoma;
}
#flashBox ul li{
Display:block;
Float:left;
width:12px;
height:12px;
line-height:12px;
margin-right:3px;
border:1px solid #999;
Background: #F0F0F0;
Text-align:center;
Cursor:pointer;
}
#flashBox ul li.hover{
border-color:red;
Background: #FFE1E1;
color:red;
}
/*]]> */
</style>
<script type= "Text/javascript" >
function Flashboxctrl (o) {
This.obj=document.getelementbyid (o);

function AddListener (ele,eventname,functionbody) {
if (ele.attachevent) {
Ele.attachevent ("On" +eventname, Functionbody);
}else if (ele.addeventlistener) {
Ele.addeventlistener ("On" +eventname,functionbody, false);
}else{
return false;
}
}
Initialization
This.init=function () {
var objimg=this.obj.getelementsbytagname ("img");
var taglength=objimg.length;
if (taglength>0) {
var oul=document.createelement ("ul");
Oul.setattribute ("id", o+ "Numtag");
for (Var i=0;i<taglength;i++) {
var oli=oul.appendchild (document.createelement ("Li"));
if (i==0) {
Oli.setattribute ("Class", "hover");
Oli.setattribute ("ClassName", "hover");
}

Oli.appendchild (document.createTextNode (i+1));
}
This.obj.appendChild (Oul);
objimg[0].style.display= "Block";
Set Label events
var otag=this.obj.getelementsbytagname ("Li");
for (Var i=0;i<otag.length;i++) {
Otag[i].onmouseover=function () {
for (j=0;j<otag.length;j++) {
Otag[j].classname= "";
Objimg[j].style.display= "None";
}
This.classname= "hover";
objimg[this.innerhtml-1].style.display= "Block";
}
}
}
};
/
This.imgroll=function () {};

This.init ();
}
</script>
<div id= "Flashbox" >




</div>
<script type= "Text/javascript" >
Generate an Object
New Flashboxctrl ("Flashbox");
</script>
</body>

Website--Cyclic picture switching effect (recently done website, already fast fried)

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.