<!DOCTYPE HTML><HTMLLang= "en"><Head> <MetaCharSet= "UTF-8"> <title>Advertisement Carousel</title> <Scripttype= "Text/javascript"src= "Tzy.js"language= "JavaScript"></Script> <Linkrel= "stylesheet"href= "Tzy.css"type= "Text/css"></Head><Bodyonload= "Lunbozantin ()"><Div> <P><b>I am the carousel picture</b></P> <imgsrc= "1.jpg"alt= "LOL pictures"ID= "Tupian"OnMouseOver= "Stoplunbo ()"onmouseout= "Lunbozantin ()"></Div></Body></HTML>
*{margin:0px;padding:0px;}Div{width:508px;Height:330px;margin:100px Auto;padding:5px;Background-color:Coral;}P{width:528px;Height:30px;text-align:Center;font-family:"in italics";Line-height:30px;font-size:25px;}img{width:Auto;Height:Auto;Background-color:Deepskyblue;-webkit-transition:width 1s, height 1s,-webkit-transform 1s;/*Tentative high width No change automatic, change is 1 seconds*/transition:width 1s, height 1s, transform 1s;}Img:hover{width:Auto;Height:Auto;Transform:Rotate (360deg);-webkit-transform:Rotate (360deg);}
vararr =NewArray ("1.jpg", "2.jpg", "3.jpg", "4.jpg");varCount = 1;varb;functionLunbo () {a= document.getElementById ("Tupian"); A.SRC=Arr[count]; Count++; if(count==4) {Count=0; }}functionStoplunbo () {clearinterval (b);}functionLunbozantin () {b= SetInterval (lunbo,3000);}
HTML 3 Second carousel (mouse selected rotation stop timer) animated case