HTML 滚动轮播特效

 三秒自动滚动播放

<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
	<script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>

    <div id="not3fahuo" style="overflow: hidden; height: 550.2px;"></div>

<script type="text/javascript" src="fangun.js"></script>
</body>
</html>

 

 


var not3chanpin=new Array("B","A");

function getfahuo(){
	var not3str="";
	if(not3chanpin.length !=0){
		not3str=not3str+not3chanpin[Math.floor((Math.random()*not3chanpin.length))]+" ";
	}
	return not3str;
}

var not3sheng=new Array(" 北京的"," 上海的"," 上海的"," 天津的"," 湖南的"," 湖北的"," 广东的"," 广西的"," 重庆的"," 四川的"," 山东的"," 河南的"," 河北的"," 山西的"," 贵州的"," 黑龙江的"," 福建的"," 浙江的"," 江苏的"," 江西的"," 海南的"," 陕西的");
var not3xing=new Array('赵**','钱**','孙**','李**','周**','吴**','郑**','王**','冯**','陈**','蒋**','沈**','韩**','杨**','朱**','秦**','许**','何**','吕**','张**','孔**','曹**','金**','魏**','陶**','姜**','谢**','苏**','范**','彭**','马**','方**','袁**','唐**','薛**','雷**','贺**','罗**');

function not3tel(){
   var not3telarr=new Array('13','15','18');
   var not3str="";
   not3str=not3telarr[parseInt(Math.random()*not3telarr.length)]+parseInt(Math.random()*10)+ '****'+ parseInt(Math.random()*10)+ parseInt(Math.random()*10)+parseInt(Math.random()*10)+parseInt(Math.random()*10);
   return "("+not3str+")";
}
   
function RndNum(n){
	var rnd="";
	for(var i=1;i<n;i++){
		rnd=Math.floor(Math.random()*10)+1;
	}
	return rnd;
}

not3fahuolist=("<ul>");
	for(i=0;i<22;i++){
		not3fahuolist=not3fahuolist+("<li><span>[最新购买]:<\/span>"+not3sheng[parseInt(Math.random()*not3sheng.length)]+' '+not3xing[parseInt(Math.random()*not3xing.length)]+" "+not3tel()+"在"+RndNum(30)+"分钟前订购了<br> "+getfahuo()+" <font color=\'#FF0000\'>√<\/font><br><br><\/li>");
	}
not3fahuolist=not3fahuolist+("<\/ul>");

function getHeight(){
	$("#not3fahuo").height();
} 
window.onload = function(){getHeight();} 
document.getElementById("not3fahuo").innerHTML=not3fahuolist;
$(function(){
	function scollDown(id,time){
          var liHeight=$("#"+id+" ul li").height();
          var time=time||2500;
          setInterval(function(){
          $("#"+id+" ul").prepend($("#"+id+" ul li:last").css("height","0px").animate({
          	height:liHeight+"px"
          },"slow"));
          },time);
	}
	scollDown("not3fahuo",3000);
});

if ($("#not3main").width()>749){
		document.write("<style>.not3order .not3orderl{float:left;display:inline;overflow:hidden;width:65%}.not3order .not3orderr{float:left;display:inline;overflow:hidden;width:35%}.not3order .not3forml .not3title img{margin-left:20px}</style>");}else{document.write("<style>.not3order .not3orderl{float:left;display:inline;overflow:hidden;width:100%}.not3order .not3orderr{float:left;display:inline;overflow:hidden;width:100%}</style>");
	}

 

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值