天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

仿迅雷焦點廣告效果(JQuery版)

首先是JS代碼部分,之前一定先引入JQuery包:
復制代碼 代碼如下:
$(document).ready(function(){
var imgUrl = new Array();
var title = new Array();
var description = new Array();
var imgLink = new Array();
var local;
var count;

local = 1; //指針位置
count = 7; //圖片數量
imgUrl[1] = "Images/ceshi.jpg";
imgUrl[2] = "Images/ceshi1.jpg";
imgUrl[3] = "Images/ceshi.jpg";
imgUrl[4] = "Images/ceshi1.jpg";
imgUrl[5] = "Images/ceshi.jpg";
imgUrl[6] = "Images/ceshi1.jpg";
imgUrl[7] = "Images/ceshi.jpg";
title[1] = "測試一下1";
title[2] = "測試一下2";
title[3] = "測試一下3";
title[4] = "測試一下4";
title[5] = "測試一下5";
title[6] = "測試一下6";
title[7] = "測試一下7";
description[1] = "描述一下1";
description[2] = "描述一下2";
description[3] = "描述一下3";
description[4] = "描述一下4";
description[5] = "描述一下5";
description[6] = "描述一下6";
description[7] = "描述一下7";
imgLink[1] = "ceshi1.ASP";
imgLink[2] = "ceshi2.ASP";
imgLink[3] = "ceshi3.ASP";
imgLink[4] = "ceshi4.ASP";
imgLink[5] = "ceshi5.ASP";
imgLink[6] = "ceshi6.ASP";
imgLink[7] = "ceshi7.ASP";

function showImage(){
$("#Buttons div").each(function(){
if($(this).attr("id") == "B"+local){
$(this).attr("class","Menu_On");
$(this).addClass("active");
$("#AdImage").attr("src",imgUrl[local]);
$("#AdTitle a").html(title[local]);
$("#AdDescription a").html(description[local]);
$("#Images a").attr("href",imgLink[local]);
}else{
$(this).removeClass("active");
$(this).attr("class","Menu_Off");
}
});
local++;
if(local > count){
local = 1;
}
theTimer = setTimeout(function(){showImage()},3000);
}

$("#Buttons div").click(function(){
local = $(this).attr("id").replace("B","");
var cid = $(this).attr("id");
$("#Buttons div").each(function(){
if($(this).attr("id") == cid){
$(this).addClass("active");
$("#AdImage").attr("src",imgUrl[$(this).attr("id").replace("B","")]);
$("#AdTitle a").html(title[$(this).attr("id").replace("B","")]);
$("#AdDescription a").html(description[$(this).attr("id").replace("B","")]);
$("#Images a").attr("href",imgLink[$(this).attr("id").replace("B","")]);
}else{
$(this).removeClass("active");
$(this).attr("class","Menu_Off");
}
});
window.clearInterval(theTimer);
showImage();
});
$("#Buttons div").mouseover(function(){
if($(this).attr("id") != "Top"){
$(this).css("cursor","pointer");
}
if($(this).attr("class") == "Menu_Off"){
$(this).attr("class","Menu_On");
}
});
$("#Buttons div").mouseout(function(){
if($(this).attr("class") == "Menu_On"){
$(this).attr("class","Menu_Off");
}
});

showImage();
});

然后是CSS部分: 
復制代碼 代碼如下:
body{
margin:0px;
padding:0px;
background-color:#FFFFFF;
}
table,th,tr,td,div,span,p{
font-size:9pt;
}
a:link{
color:#FFFFFF;
text-decoration:none;
}
a:visited{
color:#FFFFFF;
text-decoration:none;
}
a:active{
color:#FFFFFF;
text-decoration:none;
}
a:hover{
color:#FF0000;
text-decoration:none;
}
#Images{
position:relative;
width:304px;
height:270px;
border:1px #b6cae3 solid;
background-color:#FFFFFF;
}
#Titles{
width:100%;
height:73px;
right:0px;
bottom:0px;
background-color:#000000;
filter:alpha(opacity=40);
}
.Menu_On{
float:right;
width:15px;
height:18px;
background-color:#000000;
margin-left:2px;
line-height:20px;
color:#FF0000;
}
.Menu_Off{
float:right;
width:15px;
height:18px;
background-color:#000000;
margin-left:2px;
line-height:20px;
color:#FFFFFF;
}
#Top{
float:right;
width:47px;
height:18px;
background-color:#000000;
filter:alpha(opacity=40,finishopacity=100,style=1,startx=0px,starty=18px,finishx=47px,finishy=18px);
}
#AdTitle{
padding-top:10px;
padding-bottom:6px;
font-weight:bold;
color:#FFFFFF;
font-size:18px;
padding-left:10px;
}
#AdDescription{
color:#FFFFFF;
padding-left:10px;
}

最后是HTML部分: 
復制代碼 代碼如下:
<div id="Images">
<a href="ceshi1.ASP" target="_blank"><img src="Images/ceshi.jpg" border="0" id="AdImage" /></a>
<div style="position:absolute; right:0px; bottom:0px; height:73px; width:100%;">
<div id="Titles">
<div style="position:absolute; width:100%; height:73px;">
<div id="AdTitle"><a href="ceshi1.ASP" target="_blank">測試一下1</a></div>
<div id="AdDescription"><a href="ceshi1.ASP" target="_blank">描述一下1</a></div>
<div id="Buttons" style="position:absolute; right:0px; bottom:0px; height:18px; width:100%;" align="right">
<div id="B7" align="center" class="Menu_Off">7</div>
<div id="B6" align="center" class="Menu_Off">6</div>
<div id="B5" align="center" class="Menu_Off">5</div>
<div id="B4" align="center" class="Menu_Off">4</div>
<div id="B3" align="center" class="Menu_Off">3</div>
<div id="B2" align="center" class="Menu_Off">2</div>
<div id="B1" align="center" class="Menu_On active">1</div>
<div id="Top"></div>
</div>
</div>
</div>
</div>
</div>

JavaScript技術仿迅雷焦點廣告效果(JQuery版),轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 亚洲成av人影院 | 免费看片A级毛片免费看 | 这里只有精品在线视频 | 欧美日韩精品久久久免费观看 | 黄色三级视频在线观看 | 男人免费网站 | 草莓视频在线观看免费观看高清 | 国产99九九久久无码熟妇 | 忘忧草在线社区WWW日本-韩国 | 国产欧美日韩综合精品一区二区 | 国产免费看黄的私人影院 | 热热久久超碰精品中文字幕 | 美女PK精子小游戏 | 99久久国产极品蜜臀AV酒店 | 亚洲.日韩.欧美另类 | 久久精品视频15人人爱在线直播 | 95国产精品人妻无码久 | 蜜桃色欲AV久久无码精品 | 国产精品爽爽久久久久久无码 | 一本道dvd久久综合高清免费 | 俺也去最新地址 | java农村野外妇女hd | 伊人青青草原 | 9477小游戏| 国产成人精品精品欧美 | 最近2018年手机中文字幕 | 国产曰韩无码亚洲视频 | videossexotv极度另类 | 国产在线精品一区二区在线看 | 亚洲二区电影 | 快播官方网站 | 欧美一级久久久久久久大 | 啊…嗯啊好深男男高h文总受 | 美女伊人网 | 欧美性黑吊xxx | 色人阁久久 | 久久精品综合电影 | 久久热在线视频精品店 | 青青热久久综合网伊人 | 99国产精品成人免费视频 | 国产精品综合AV一区二区国产馆 |