- IOC容器使用示例
- 如何通过软文投放提高媒体网站的权重值?三个办法让软文投放更有曝光度
- C#实例化类的方式
- 锚文本要怎么做?
- Nuxt 4 有哪些新特性?
- 购物车的数据是放缓存中还是保存在数据库中?
- vue中ref用法
- thinkphp实例化模型、模型命名和获取字段
- ASP的域名重定向到目录功能的实现
- ElementUI核心标签以及在Vue中的使用
邮箱:
手机:15383239821
图片向上滚动(一格一格的)
js 代码:
marqueesHeight=60;
stopscroll=false;
with(makewing){
style.width=0;
style.height=marqueesHeight;
style.overflowX="visible";
style.overflowY="hidden";
noWrap=true;
on
on
}
preTop=0; currentTop=marqueesHeight; stoptime=0;
makewing.innerHTML+=makewing.innerHTML;
function init_srolltext(){
makewing.scrollTop=0;
setInterval("scrollUp()",1);
}init_srolltext();
function scrollUp(){
if(stopscroll==true) return;
currentTop+=1;
if(currentTop==marqueesHeight+1)
{
stoptime+=1;
currentTop-=1;
if(stoptime==300)
{
currentTop=0;
stoptime=0;
}
}
else {
preTop=makewing.scrollTop;
makewing.scrollTop+=1;
if(preTop==makewing.scrollTop){
makewing.scrollTop=marqueesHeight;
makewing.scrollTop+=1;
}
}
}
init_srolltext();
HTML代码:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="Copyright" content="爱JavaS
<meta name="description" content="图片上下滚动代码,分享个人的JavaS
<meta content="图片上下滚动代码演示,图片上下循环代码演示" name="keywords" />
<title>图片上下滚动代码演示 - 爱JavaS
<style type="text/css">
body {text-align:center}
td {font-size: 12px;text-align:center}
</style>
</head>
<BODY>
<div id=makewing style="height:60">
<table width="778" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="60" bgcolor="#66CCFF">1此处放图片</td>
</tr>
<tr>
<td height="60" bgcolor="#FFCC66">2此处放图片</td>
</tr>
<tr>
<td height="60" bgcolor="#99CC66">3此处放图片</td>
</tr>
<tr>
<td height="60" bgcolor="#66CCFF">4此处放图片</td>
</tr>
<tr>
<td height="60" bgcolor="#FFCC66">5此处放图片</td>
</tr>
<tr>
<td height="60" bgcolor="#99CC66">6此处放图片</td>
</tr>
</table>
<script type="text/javas
</div>
</BODY>
</HTML>
- 上一篇:一段自适应高度的圆角css矩形
- 下一篇:H1,H2标签用法
-
2012-07-05石家庄飞讯网站Session失效太快的解决方法
-
2010-11-11网站的内容可以给我们带来什么呢?
-
2019-03-27教给大家一些简单的网站推广方法
-
2010-12-09热搜关键词是什么意思?
-
2013-02-16使用X-UA-Compatible来设置IE8兼容模式
-
2024-10-27怎么查看nodejs安装路径
