先来张效果图
样式
复制代码 代码如下:
#div_left{float:left;width:60px;height:86px;}
#starScroll{width:843px;height:188px;margin-left:15px;margin-right:15px;padding-top:9px;overflow:hidden;border:1px solid red;float:left;}
#starScroll #contentScroll{width:500%}
#starScroll #ScrollOne{float:left;}
#starScroll #ScrollOne a{float:left;width:204px;height:188px;margin-right:9px;float:left;display:inline;}
#starScroll #ScrollOne img{width:204px;height:188px;border:0px;}
#starScroll #ScrollTwo{float:left;}
#starScroll #ScrollTwo a{float:left;width:204px;height:188px;margin-right:9px;float:left;display:inline;}
#starScroll #ScrollTwo img{width:204px;height:188px;border:0px;}
#div_right{float:left;width:60px;height:86px;}
.arrow{background:url(images/arrow.png) no-repeat;cursor:pointer;height:86px;width:60px;cursor:pointer;display:block;margin-top:50px;}
.prev{background-position:left top;}
.prev:hover{background-position:left bottom;}
.next{background-position:right top;}
.next:hover{background-position:right bottom;}
html代码
复制代码 代码如下:
<div>
<div id="div_left">
<span id="btn_left" class="arrow prev"></span>
</div>
<div id="starScroll">
<div id="contentScroll">
<div id="ScrollOne">
<a href="#" title="1"><img src="/UploadFiles/2021-04-02/1.jpg"> <a href="#" title="2"><img src="images/2.jpg"> <a href="#" title="3"><img src="/UploadFiles/2021-04-02/3.jpg"> <a href="#" title="4"><img src="images/4.jpg"> <a href="#" title="5"><img src="/UploadFiles/2021-04-02/5.jpg"> <a href="#" title="6"><img src="images/6.jpg"> <a href="#" title="7"><img src="/UploadFiles/2021-04-02/7.jpg"> <a href="#" title="8"><img src="images/8.jpg"> </div>
<div id="ScrollTwo"></div>
</div>
</div>
<div id="div_right">
<span id="btn_right" class="arrow next"></span>
</div>
</div>
JS代码
复制代码 代码如下:
<script type="text/javascript">
var Scroll=(function(){
return function(){
var starScroll = document.getElementById("starScroll"),
ScrollOne = document.getElementById("ScrollOne"),
aCollection = ScrollOne.getElementsByTagName("a"),
aLength = aCollection.length,
ScrollTwo = document.getElementById("ScrollTwo"),
btn_left = document.getElementById("btn_left"),
btn_right = document.getElementById("btn_right");
var Width = 204,Current = 1,Rate = 7,TimeTimeout=1000,TimeInterval=10,MarginRight=9;
var SInterval=null,STimeout=null;
var flag=true;
function ScrollLeft(){
var CountWidth = Current*Width+Current*MarginRight,
SLeftPara=starScroll.scrollLeft;
if(ScrollTwo.offsetWidth-SLeftPara==0){
starScroll.scrollLeft=0;
Current=0;
}
if(CountWidth-SLeftPara==0){
Forward();
}
else{
var v = Math.round((CountWidth-SLeftPara)/Rate);
v = v<1 ? 1 : v;
SetScrollLeft(SLeftPara+v);
}
}
function SetScrollLeft(scrollleft){
starScroll.scrollLeft=scrollleft;
}
function Init(){
flag=false;
SInterval=setInterval(ScrollLeft,TimeInterval);
}
function Forward(){
clearInterval(SInterval);
Current++;
flag=true;
STimeout = setTimeout(Init,TimeTimeout);
}
btn_right.onclick=function(){
if(flag){
clearTimeout(STimeout);
Init();
}
}
function ScrollRight(){
var CountWidth = Current*Width+Current*MarginRight,
SLeftPara = starScroll.scrollLeft;
if(CountWidth-SLeftPara==0){
Forward();
}
else{
var v = Math.round((CountWidth-SLeftPara)/Rate);
v = v>-1?-1:v;
SetScrollLeft(SLeftPara+v);
}
}
btn_left.onclick=function(){
if(!flag){
return;
}
flag=false;
clearTimeout(STimeout);
if(Current==1){
SetScrollLeft(ScrollTwo.offsetWidth);
Current=aLength+1;
}
Current-=2;
SInterval = setInterval(ScrollRight,TimeInterval);
}
if(aLength>0){
starScroll.scrollLeft=0;
ScrollTwo.innerHTML = ScrollOne.innerHTML;
STimeout = setTimeout(Init,TimeTimeout);
}
}
})();
Scroll();
</script>
js,图片,滚动
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。
更新日志
- 小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE]
- 群星《欢迎来到我身边 电影原声专辑》[320K/MP3][105.02MB]
- 群星《欢迎来到我身边 电影原声专辑》[FLAC/分轨][480.9MB]
- 雷婷《梦里蓝天HQⅡ》 2023头版限量编号低速原抓[WAV+CUE][463M]
- 群星《2024好听新歌42》AI调整音效【WAV分轨】
- 王思雨-《思念陪着鸿雁飞》WAV
- 王思雨《喜马拉雅HQ》头版限量编号[WAV+CUE]
- 李健《无时无刻》[WAV+CUE][590M]
- 陈奕迅《酝酿》[WAV分轨][502M]
- 卓依婷《化蝶》2CD[WAV+CUE][1.1G]
- 群星《吉他王(黑胶CD)》[WAV+CUE]
- 齐秦《穿乐(穿越)》[WAV+CUE]
- 发烧珍品《数位CD音响测试-动向效果(九)》【WAV+CUE】
- 邝美云《邝美云精装歌集》[DSF][1.6G]
- 吕方《爱一回伤一回》[WAV+CUE][454M]