Dreamweaver图片连续滚动
Dreamweaver在布局单元格里显示连续滚动的图片布局单元格600*120我想让他从左到右滚动滚6张首尾相接能感应鼠标当鼠标移动上去就停止请哪个高手帮忙写段代码。。。...
Dreamweaver
在布局单元格里 显示连续滚动的图片
布局单元格600*120
我想让他从左到右滚动
滚6张
首尾相接
能感应鼠标 当鼠标移动上去就停止
请哪个高手帮忙写段代码 。。。。
写完整一下,要我直接复制进去就行!
加一个
随机显示图片 展开
在布局单元格里 显示连续滚动的图片
布局单元格600*120
我想让他从左到右滚动
滚6张
首尾相接
能感应鼠标 当鼠标移动上去就停止
请哪个高手帮忙写段代码 。。。。
写完整一下,要我直接复制进去就行!
加一个
随机显示图片 展开
展开全部
该代码测试过了,没问题的。把图片换成你自己的就可以了。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width=600 height="120" border=0 cellpadding=5 cellspacing=0>
<tr>
<td width="580"> <div id=demo style=overflow:hidden;height:100;width:580;color:#ffffff>
<table align=left cellpadding=0 cellspace=0 border=0>
<tr>
<td id=demo1 valign=top> <table border=0 cellpadding=0 cellspacing=0>
<tr align="center">
<td><a href="#" target="_blank"><img src=
"img/c1.jpg" width="150" height="40" hspace="3" border="0" align="absmiddle"></a></td>
<td><a href="#" target="_blank"><img src=
"img/c2.jpg" width="150" height="40" hspace="3" border="0" align="absmiddle"></a></td>
<td><a href="#" target="_blank"><img src=
"img/c3.jpg" width="150" height="40" hspace="3" border="0" align="absmiddle"></a></td>
<td><a href="#" target="_blank"><img src=
"img/c4.jpg" width="150" height="40" hspace="3" border="0" align="absmiddle"></a></td>
<td><a href="#" target="_blank"><img src=
"img/c5.jpg" width="150" height="40" hspace="3" border="0" align="absmiddle"></a></td>
<td><a href="#" target="_blank"><img src=
"img/c6.jpg" width="150" height="40" hspace="3" border="0" align="absmiddle"></a></td>
</tr>
</table></td>
<td id=demo2 valign=top></td>
</tr>
</table>
</div>
<script>
var speed=20//速度数值越大速度越慢
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script> </td>
</tr>
</table>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width=600 height="120" border=0 cellpadding=5 cellspacing=0>
<tr>
<td width="580"> <div id=demo style=overflow:hidden;height:100;width:580;color:#ffffff>
<table align=left cellpadding=0 cellspace=0 border=0>
<tr>
<td id=demo1 valign=top> <table border=0 cellpadding=0 cellspacing=0>
<tr align="center">
<td><a href="#" target="_blank"><img src=
"img/c1.jpg" width="150" height="40" hspace="3" border="0" align="absmiddle"></a></td>
<td><a href="#" target="_blank"><img src=
"img/c2.jpg" width="150" height="40" hspace="3" border="0" align="absmiddle"></a></td>
<td><a href="#" target="_blank"><img src=
"img/c3.jpg" width="150" height="40" hspace="3" border="0" align="absmiddle"></a></td>
<td><a href="#" target="_blank"><img src=
"img/c4.jpg" width="150" height="40" hspace="3" border="0" align="absmiddle"></a></td>
<td><a href="#" target="_blank"><img src=
"img/c5.jpg" width="150" height="40" hspace="3" border="0" align="absmiddle"></a></td>
<td><a href="#" target="_blank"><img src=
"img/c6.jpg" width="150" height="40" hspace="3" border="0" align="absmiddle"></a></td>
</tr>
</table></td>
<td id=demo2 valign=top></td>
</tr>
</table>
</div>
<script>
var speed=20//速度数值越大速度越慢
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script> </td>
</tr>
</table>
</body>
</html>
博思aippt
2024-07-20 广告
2024-07-20 广告
作为深圳市博思云创科技有限公司的工作人员,对于Word文档生成PPT的操作,我们有以下建议:1. 使用另存为功能:在Word中编辑完文档后,点击文件->另存为,选择PowerPoint演示文稿(*.pptx)格式,即可将文档内容转换为PPT...
点击进入详情页
本回答由博思aippt提供
展开全部
这个带悬停放大功能,肯定满足你的要求,比你的要求做的还好.
<!-- saved from url=file://C:/Documents and Settings/yfq/桌面/鼠标悬停并放大图片.html -->
<script>
window.onerror = new Function("return(false);")
</script><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>WebForm1</TITLE>
<SCRIPT type=text/javascript>
var interval=1;
function changeBoxMarginLeft(v,val){
if(v.style.marginLeft == ""){
v.style.marginLeft = "0px";
}
var current = Number(v.style.marginLeft.substr(0,v.style.marginLeft.indexOf("p")));
v.style.marginLeft = Number(current + val) + "px";
}
function changeBoxMarginTop(v,val){
if(v.style.marginTop == ""){
v.style.marginTop = "0px";
}
var current = Number(v.style.marginTop.substr(0,v.style.marginTop.indexOf("p")));
v.style.marginTop = Number(current + val) + "px";
}
function over(v){
var maxWidth = 200;
if(v.interval != undefined){
clearInterval(v.interval);
}
v.intervalID = setInterval(function(){
if(v.width < maxWidth) {
v.width = v.width + 10;
topchange = v.width * 3/4 - v.height;
v.height = v.width * 3/4;
changeBoxMarginLeft(v,-5);
changeBoxMarginTop(v,-topchange/2);
}
else{
clearInterval(v.intervalID);
}
},interval);
}
function out(v){
var minWidth = 100;
clearInterval(v.intervalID);
v.interval = setInterval(function(){
if(v.width > minWidth) {
v.width = v.width - 10 ;
v.height = v.width * 3/4;
changeBoxMarginLeft(v,5);
changeBoxMarginTop(v,topchange/2)
}
else{
clearInterval(v.interval);
}
},interval);
}
</SCRIPT>
</HEAD>
<BODY><!--StartFragment--><FORM id=Form1>
<MARQUEE onmouseover=this.stop() onmouseout=this.start() scrollAmount=5
scrollDelay=80><IMG onmouseover=over(this)
style="MARGIN-TOP: 9px; MARGIN-LEFT: 0px" onmouseout=out(this) height=75
src="200653120441701029.jpg" width=100
intervalID="30690093" interval="30690094"> <IMG onmouseover=over(this)
style="MARGIN-TOP: 9px; MARGIN-LEFT: 0px" onmouseout=out(this) height=75
src="200653120441701029.jpg" width=100
intervalID="30690091" interval="30690092"></MARQUEE></FORM><!--EndFragment--></BODY>
</HTML>
<!-- saved from url=file://C:/Documents and Settings/yfq/桌面/鼠标悬停并放大图片.html -->
<script>
window.onerror = new Function("return(false);")
</script><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>WebForm1</TITLE>
<SCRIPT type=text/javascript>
var interval=1;
function changeBoxMarginLeft(v,val){
if(v.style.marginLeft == ""){
v.style.marginLeft = "0px";
}
var current = Number(v.style.marginLeft.substr(0,v.style.marginLeft.indexOf("p")));
v.style.marginLeft = Number(current + val) + "px";
}
function changeBoxMarginTop(v,val){
if(v.style.marginTop == ""){
v.style.marginTop = "0px";
}
var current = Number(v.style.marginTop.substr(0,v.style.marginTop.indexOf("p")));
v.style.marginTop = Number(current + val) + "px";
}
function over(v){
var maxWidth = 200;
if(v.interval != undefined){
clearInterval(v.interval);
}
v.intervalID = setInterval(function(){
if(v.width < maxWidth) {
v.width = v.width + 10;
topchange = v.width * 3/4 - v.height;
v.height = v.width * 3/4;
changeBoxMarginLeft(v,-5);
changeBoxMarginTop(v,-topchange/2);
}
else{
clearInterval(v.intervalID);
}
},interval);
}
function out(v){
var minWidth = 100;
clearInterval(v.intervalID);
v.interval = setInterval(function(){
if(v.width > minWidth) {
v.width = v.width - 10 ;
v.height = v.width * 3/4;
changeBoxMarginLeft(v,5);
changeBoxMarginTop(v,topchange/2)
}
else{
clearInterval(v.interval);
}
},interval);
}
</SCRIPT>
</HEAD>
<BODY><!--StartFragment--><FORM id=Form1>
<MARQUEE onmouseover=this.stop() onmouseout=this.start() scrollAmount=5
scrollDelay=80><IMG onmouseover=over(this)
style="MARGIN-TOP: 9px; MARGIN-LEFT: 0px" onmouseout=out(this) height=75
src="200653120441701029.jpg" width=100
intervalID="30690093" interval="30690094"> <IMG onmouseover=over(this)
style="MARGIN-TOP: 9px; MARGIN-LEFT: 0px" onmouseout=out(this) height=75
src="200653120441701029.jpg" width=100
intervalID="30690091" interval="30690092"></MARQUEE></FORM><!--EndFragment--></BODY>
</HTML>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
楼主要的效果我以前做过,用一个marquee标签就搞定,代码也不多,大致如下(楼主虽然要求直接复制进去就能用,不过图片地址还是要自己改一下吧):
<marquee scrollamount=3 scrolldelay=3 valign=middle onmouseover=this.stop() onmouseout=this.start() behavior="alternate">
<img border="0" src=" img/01.jpg">
<img border="0" src=" img/02.jpg">
<img border="0" src=" img/03.jpg">
<img border="0" src=" img/04.jpg">
<img border="0" src=" img/05.jpg">
<img border="0" src=" img/06.jpg">
</marquee>
关于marquee标签的参数设置,楼主可以baidu一下,很简单的,例如behavior参数设置成alternate,表示从左到右滚动到最后一张后,自动从右滚动回来。希望对楼主有用!
<marquee scrollamount=3 scrolldelay=3 valign=middle onmouseover=this.stop() onmouseout=this.start() behavior="alternate">
<img border="0" src=" img/01.jpg">
<img border="0" src=" img/02.jpg">
<img border="0" src=" img/03.jpg">
<img border="0" src=" img/04.jpg">
<img border="0" src=" img/05.jpg">
<img border="0" src=" img/06.jpg">
</marquee>
关于marquee标签的参数设置,楼主可以baidu一下,很简单的,例如behavior参数设置成alternate,表示从左到右滚动到最后一张后,自动从右滚动回来。希望对楼主有用!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
哥们,百度,无缝滚动,好多的呀。。。
6个的话,你就只要稍微改改的。。!!
你也可以HI我。
6个的话,你就只要稍微改改的。。!!
你也可以HI我。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询