js实现图片定时向上滚动展示特效

2周前 (04-18 12:38)阅读21回复0
大陆
大陆
  • 管理员
  • 发消息
  • 注册排名1
  • 经验值4014
  • 级别管理员
  • 主题802
  • 回复2
楼主

商城或交友网站常用的一种图片定时向上滚动展示特效,当用户的鼠标经过时暂停滚动,移开后恢复滚动效果。

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren">
<meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。">
<title>js实现图片定时向上滚动展示特效_武鸣人</title>
<style type="text/css">
<!--
#wuming_ren{float:left;overflow:hidden;height:80px;background:#E0E0E0;padding:0px;width:780px; margin-top:0px;}
#www_wuming_ren{float:left;text-align:left;width:780px;font-size:12px;font-family: "宋体";}
#www_wuming_ren ul{list-style:none; padding:0; margin:0;}
#www_wuming_ren li{line-height:60px;color:#FF0000;}
#www_wuming_ren li a{color:#FF0000; text-decoration:none;}
-->
</style>
</head>
<body>
<a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr>
<!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。-->
<script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script>
<script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script>
<div id="wuming_ren">
<div id="www_wuming_ren">
<ul>
<table width="780" align="center" cellpadding="0" cellspacing="0" bordercolor="#FF00FF">
  <tr>
    <th><img src="/img/20240418_www_wuming_ren_5.jpg" width="130" height="80"></th>
    <th><img src="/img/20240418_www_wuming_ren_6.jpg" width="130" height="80"></th>
    <th><img src="/img/20240418_www_wuming_ren_7.jpg" width="130" height="80"></th>
    <th><img src="/img/20240418_www_wuming_ren_8.jpg" width="130" height="80"></th>
    <th><img src="/img/20240418_www_wuming_ren_9.jpg" width="130" height="80"></th>
    <th><img src="/img/20240418_www_wuming_ren_10.jpg" width="130" height="80"></th>
  </tr>
</table></li>
<li><table width="780" align="center" cellpadding="0" cellspacing="0" bordercolor="#FF00FF">
  <tr>
    <th><img src="/img/20240418_www_wuming_ren_11.jpg" width="130" height="80"></th>
    <th><img src="/img/20240418_www_wuming_ren_12.jpg" width="130" height="80"></th>
    <th><img src="/img/20240418_www_wuming_ren_13.jpg" width="130" height="80"></th>
    <th><img src="/img/20240418_www_wuming_ren_14.jpg" width="130" height="80"></th>
    <th><img src="/img/20240418_www_wuming_ren_15.jpg" width="130" height="80"></th>
    <th><img src="/img/20240418_www_wuming_ren_16.jpg" width="130" height="80"></th>
  </tr>
</table></li>
</ul>
</div>
</div>
<p style="margin-top:80px;"> </p> 
<script type="text/javascript" language="javascript">
<!--
//以下参数请勿修改
try{
var marqueesHeight = 80; //高度
var stopscroll     = false;
var scrollElem =   document.getElementById("wuming_ren");
with(scrollElem){
style.width     = 780;//宽度
style.height    = marqueesHeight;
style.overflow  = 'hidden';
noWrap          = true;
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
scrollElem.onmouseover = new   Function('stopscroll = true');
scrollElem.onmouseout  = new   Function('stopscroll = false');
var preTop     = 0;
var currentTop = 0;
var stoptime   = 0;
var leftElem =   document.getElementById("www_wuming_ren");
scrollElem.appendChild(leftElem.cloneNode(true));
init_srolltext();
}catch(e) {}
function init_srolltext(){
scrollElem.scrollTop = 0;
setInterval('scrollUp()', 15); //滚动速度
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
function scrollUp(){
if(stopscroll) return;
currentTop += 1;
if(currentTop == 81) { //滚动距离
stoptime += 1;
currentTop -= 1;
if(stoptime == 220) { //停顿时间
currentTop = 0;
stoptime = 0;
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
}else{
preTop = scrollElem.scrollTop;
scrollElem.scrollTop += 1;
if(preTop == scrollElem.scrollTop){
scrollElem.scrollTop = 0;
scrollElem.scrollTop += 1;
}
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
}
//-->
</script>
</body>
</html>


0
0
收藏0
回帖

js实现图片定时向上滚动展示特效 期待您的回复!

取消
载入表情清单……
载入颜色清单……
插入网络图片

取消确定

图片上传中
编辑器信息
提示信息