来源:http://www.ido321.com/862.html

html代码:

>
>
>
>
>
<!-- css -->
>
<!-- js -->
>
   1:
>

</script>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

css代码

 #ad
 {
1350px;
370px;
hidden;
-5px;
relative;
 }
ul
 {
none;
absolute;
-40px;
 }
li
 {
left;
1350px;
370px;
relative;
 }
.slideshortcut a
 {
#000000;
none;
#fff;
block;
absolute;
500;
150px;
50px;
50px;
1px solid red;
40px;
40px;
center;
     opacity: 0;
 }
.slideshortcut a:hover
 {
#000000;
none;
 }
.prev
 {
150px;
 }
.next
 {
1200px;
 }
.jiaodiandiv
 {
absolute;
200;
320px;
left: 42%
 }
ul
 {
none;
 }
li
 {
30px;
30px;
10px;
left;
1px solid #B7B7B7;
#B7B7B7;
15px;
center;
 }
 #selectli
 {
#FF4400;
 }
li:hover
 {
pointer;
 }
span
 {
20px;
30px;
 }

js代码:

function()
   {
/*轮播*/
var index = 0;
/*焦点li元素集合*/
var timer;
'#ad').width();
).length;
//左右滚动,即所有li元素都是在同一排向左浮动,所以这里需要计算出外围ul元素的宽度
,liWidth * (len));
  11:
//上一张按钮
function() {
     clearInterval(timer);
     index -= 1;
if(index == -1) {index = len - 1;}
     showPic(index);
     });
  19:
//下一张按钮
function() {
     clearInterval(timer);
     index += 1;
if(index == len) {index = 0;}
     showPic(index);
     });
//轮播
'#ad').hover(
function()
     {
/*停止动画*/
'0.4');
     },
function()
     {
'.slideshortcut a').hide();
function() {
         showPic(index);
         index++;
if(index == len) {index = 0;}
       },2000);
);
/*显示index图片*/
function showPic(index){
var nowLeft = -index*liWidth;
'#FF4400');
'#B7B7B7');
:nowLeft},300);
/*$('#loginimg').hide().fadeIn(1000);*/
     }
function()
     {
'.slideshortcut a').show();
     });
'.prev').mouseover(
function()
     {
'pointer'});
     });
'.next').mouseover(
function()
     {
'pointer'});
     });
/*点击焦点区的div显示对应图*/
     jdlis.click(
function(){
       clearInterval(timer);
this);
       showPic(index);
     });
   });

 

打包下载:http://download.csdn.net/detail/u011043843/7994017

相关文章:

  • 2021-11-11
  • 2021-06-15
  • 2021-11-22
  • 2021-10-09
  • 2021-10-19
  • 2021-08-04
  • 2021-12-08
  • 2021-11-04
猜你喜欢
  • 2021-06-16
  • 2022-01-11
  • 2021-08-14
  • 2021-09-25
  • 2021-10-07
  • 2021-11-12
  • 2021-12-08
  • 2021-12-05
相关资源
相似解决方案