导航:首页 > 万维百科 > 网页设计两行图片不同方向滚动

网页设计两行图片不同方向滚动

发布时间:2020-12-28 10:50:25

1、我制作的网页,我想让多个图片在一行里滚动,应该怎么办?

图片滚动代码 (从右向左滚动)

<marquee scrollamount=1 scrolldelay=3 valign=middle behavior="scroll">

<img border="0" src=" http://要滚动的图内片地址容1">

<img border="0" src=" http://要滚动的图片地址2">
......

</marquee>

2、急求!!!在网页中怎样让几张连续图片来回滚动,用HTML什么代码?谢了

使用DIV,CSS样式来做!
一般现在使用3P来实现,如APS.NET!
你可以拷贝一个脚本修改里面的参数,就可专以达到效果了!

使用属html代码,只能使用一个!

就是跑马灯标签来实现简单的效果!

<marquee></marquee>这个标签!

如:

<marquee direction=left scrollamount=6 onmouseover="this.stop()" onmouseout="this.start()">
这是一段 跑动 的文字.我经过它就能停下来.</marquee>
<input type=button value=关闭窗口 onclick="window.close()">
<input type=button value=刷新 onclick="history.go(0)">
</body></html>
其中的scrollamount属性可以改变速度.值小它就会变慢.
height可以改变高度.direction可以改变方向.direction=up就会向上动

我建议你去找一ASP,或者JavaScript的代码来进行修改参数!

3、网页实现双排图片同方向滚动的代码

我可以帮你
<html>
<head>
<title>图片滚动</title>
</head>
<body>
<div id="marquee_demo" style="overflow:hidden;width:100%;text-align:center;border:1px solid #0066cc">
<table cellspacing="0" cellpadding="3" align="center" border="0">
<tr>
<td id="marquee_proct1" valign="top">
<table width="100%" height="100" border="0" cellpadding="2" cellspacing="0">
<tr>
<td><a href="#"><img src="/jscss/demoimg/wall_s1.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s2.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s3.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s4.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s5.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s6.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s7.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s8.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s9.jpg" border=0 width="100" height="100"></a></td>
</tr>
</table>
<table width="100%" height="100" border="0" cellpadding="2" cellspacing="0">
<tr>
<td><a href="#"><img src="/jscss/demoimg/wall_s1.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s2.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s3.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s4.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s5.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s6.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s7.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s8.jpg" border=0 width="100" height="100"></a></td>
<td><a href="#"><img src="/jscss/demoimg/wall_s9.jpg" border=0 width="100" height="100"></a></td>
</tr>
</table>
</td>
<td valign="top" id="marquee_proct2"></td>
</tr>
</table>
</div>
<script type="text/javascript">
var speed=30;
marquee_proct2.innerHTML=marquee_proct1.innerHTML;
function Marquee(){
if(marquee_demo.scrollLeft>=marquee_proct1.scrollWidth){
marquee_demo.scrollLeft=0;
}
else{
marquee_demo.scrollLeft++;
}
}
var MyMar=setInterval(Marquee,speed);
marquee_demo.onmouseover=function(){clearInterval(MyMar);}
marquee_demo.onmouseout=function(){MyMar=setInterval(Marquee,speed);}
</script>
</body>
</html>

4、网页设计图片滚动问题,怎样让一张很长的图片从下滚到上

<marquee><img src=""/></marquee>

src是图片地址,你试试,不会的话问我

5、如何让网页中的图片和文字一起由左向右连续滚动?

去找原代码啊~~滚动代码里有
给个提示
marquee
GOOGLE是好物~~请善于使用这个东西
http://www.lib.tsinghua.e.cn/chinese/INTERNET/HTML/Normal/marquee.html
看这个网址吧
上面比较全

简单来说,就是这样
<marquee direction=right loop=-1 scrollamount=20 width=1000>文字</marquee>
direction表示方向:left,right
behavior表示运动的方式alternate表示来回,没有这个参数也可以
loop表示循环次数
scrollamount表示速度
而width或height表示宽和高,如果是横向走的就用width,纵向的就用height。
想知道更全的,就看看我上面给的地址吧
-----------------
另外,我想这个用不到ASP吧,这只是简单的HTML代码啊~而且从左到右滚动的话,根本用不上高这个参数的啊
答错了不要怪我,我就只知道这些

6、网页制作怎样让图片滚动?

网页图片无缝滚动实现代码:
<style type="text/css">
<!--
ul,li,div{margin:0; padding:0; font-size:12px;}
#demo {
width:678px; float:right; overflow:hidden;height:144px; border:none;
}
#indemo {
float: left;
width: 800%;
}
#demo1,#demo2{height:144px;float:left; display:inline-table;}
#demo1 li,#demo2 li{ width:127px; height:144px; float:left; padding-left:8px; }
#demo1 li img,#demo2 li img{ display:block; background:#ccc; padding:1px; border:1px solid #ccc;}
#demo1 li span,#demo2 li span{ width:127px; height:30px; line-height:30px; text-align:center; overflow:hidden;}
#demo1 {
float: left;
}
#demo2 {
float: left;
}
-->
</style>
<div id="demo">
<div id="indemo">
<div id="demo1">
<ul>
<li><a href="#"><img src="http://boaer.comimg/temp01.gif" width="123" height="110" /></a><span><a href="#">产品名称</a></span></li>
<li><a href="#"><img src="http://boaer.comimg/temp02.gif" width="123" height="110" /></a><span><a href="#">产品名称</a></span></li>
<li><a href="#"><img src="http://boaer.comimg/temp03.gif" height="110" /></a><span><a href="#">产品名称</a></span></li>
</ul></div><div id="图片展示代码例子"></div></div></div><script>
<!--
var speed=20; //数字越大速度越慢
var tab=document.getElementById("demo");
var tab1=document.getElementById("demo1");
var tab2=document.getElementById("demo2");
tab2.innerHTML=tab1.innerHTML;
function Marquee(){
if(tab2.offsetWidth-tab.scrollLeft<=0)
tab.scrollLeft-=tab1.offsetWidth
else{
tab.scrollLeft++;
}
}
var MyMar=setInterval(Marquee,speed);
tab.onmouseover=function() {clearInterval(MyMar)};
tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)};
-->
</script></td>
</tr>
</table>

7、html网页中图片横向滚动

1、有截取滚动网页的软件,如FSCapture,就可以截取整个网页。

2、 然后打开要截取的网页,在FSCapture悬浮窗口上找到滚动截图工具。

3、在默认情况下,是截整个界面,包括浏览器窗口,如果默认,下面有提示,点一下鼠标左键即可。

4、 如果要自定义截图窗口,按住Ctrl键,就会出现一个红色十字架,用鼠标拖动这个红十字架,框住想要的窗口。然后拖动右侧的滚动条到上端,或者点下端的滚动箭头,就能截取整个网页。

5、完成截图后,会自动返回到FSCapture编辑窗口,这时只要保存即可。

6、 选择一个保存文件夹,定义一个保存文件名,如滚动截图,按保存。

7、再用普通的看图软件ACDSee打开,就能看到一个长长的网页图,看看长宽比930x1776。

8、图片不间断左右滚动效果,并且可以控制方向

<div id="demo" style="overflow:hidden;width:510px; border:1px solid blue;">

<div id="demo1">

<table cellspacing="0">

<tr>
<td><img src="http://www.baidu.com/img/lm.gif"></td>
<td><img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-.gif"></td>
<td><img src="http://www.baidu.com/img/lm.gif"></td>
<td><img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-.gif"></td>
<td><img src="http://www.baidu.com/img/lm.gif"></td>
<td><img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-.gif"></td>
<td><img src="http://www.baidu.com/img/lm.gif"></td>
<td><img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-.gif"></td>
<td><img src="http://www.baidu.com/img/lm.gif"></td>
<td><img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-.gif"></td>
<td><img src="http://www.baidu.com/img/lm.gif"></td>
<td><img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-.gif"></td>
<td><img src="http://www.baidu.com/img/lm.gif"></td>
<td><img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-.gif"></td>
<td><img src="http://www.baidu.com/img/lm.gif"></td>
<td><img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-.gif"></td>

</tr>

</table>

</div>

<div id="demo2"></div>

</div>
<input type="button" value="向左" onclick="changeRedirect(0)">
<input type="button" value="向右" onclick="changeRedirect(1)">

<script style="text/javascript">

var speed=40;//数值越大,速度越慢

var demo2=document.getElementById("demo2");

var demo1=document.getElementById("demo1");

var demo=document.getElementById("demo");

demo.scrollLeft=demo.scrollWidth

function MarqueeLeft(){

if(demo2.offsetWidth-demo.scrollLeft<=0)

demo.scrollLeft-=demo1.offsetWidth

else{

demo.scrollLeft++

}

}

function MarqueeRight(){

if(demo.scrollLeft<=0)

demo.scrollLeft+=demo2.offsetWidth

else{

demo.scrollLeft--

}

}

var MyMar=setInterval(MarqueeRight,speed);

demo.onmouseover=function() {clearInterval(MyMar);}

demo.onmouseout=function() {MyMar=setInterval(MarqueeRight,speed);}

function changeRedirect(i)
{
clearInterval(MyMar);
if(i==0)
{
MyMar=setInterval(MarqueeLeft,speed);
demo.onmouseout=function() {MyMar=setInterval(MarqueeLeft,speed);}
}
else
{
MyMar=setInterval(MarqueeRight,speed);
demo.onmouseout=function() {MyMar=setInterval(MarqueeRight,speed);}
}

}

</script>

9、在网页中插入两行相同的图片滚动代码后两个图片列都不滚动了……但一个可以滚动,求高手指教

滚动代码1
<div id="gpic" style="overflow:hidden; width:400px; height:182px;">
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td id="gpic1" valign="top" align="center"><table width="974" height="113" border="0" align='center' cellpadding="0" cellspacing="0">
<tr>
<td valign='top' bgcolor="#FF0000"> </td>
<td valign='top' bgcolor="#0066CC"> </td>
<td valign='top' bgcolor="#6600CC"> </td>
<td valign='top' bgcolor="#FF00CC"> </td>
</tr>
</table></td>
<td id="gpic2" valign="top"></td>
</tr>
</table>
</div>
<script>
var speed=30
gpic2.innerHTML=gpic1.innerHTML
function Marquee(){
if(gpic2.offsetWidth-gpic.scrollLeft<=0)
gpic.scrollLeft-=gpic1.offsetWidth
else{
gpic.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
gpic.onmouseover=function() {clearInterval(MyMar)}
gpic.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>

滚动代码2
<div id="hpic" style="overflow:hidden; width:400px; height:182px;">
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td id="hpic1" valign="top" align="center"><table width="974" height="113" border="0" align='center' cellpadding="0" cellspacing="0">
<tr>
<td valign='top' bgcolor="#FF0000"> </td>
<td valign='top' bgcolor="#0066CC"> </td>
<td valign='top' bgcolor="#6600CC"> </td>
<td valign='top' bgcolor="#FF00CC"> </td>
</tr>
</table></td>
<td id="hpic2" valign="top"></td>
</tr>
</table>
</div>
<script>
var speed=30
hpic2.innerHTML=hpic1.innerHTML
function Marquee(){
if(hpic2.offsetWidth-hpic.scrollLeft<=0)
hpic.scrollLeft-=hpic1.offsetWidth
else{
hpic.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
hpic.onmouseover=function() {clearInterval(MyMar)}
hpic.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>

直接复制以上代码另存为一个html文件,,运行即可

10、我在php网页制作中,我想弄两行图片同时进行循环滚动展播,插入第二个图片滚动后,二个都不能用了,请教

这里有一个无缝滚动效果
方向可以自己设置
可以设置定高定宽停顿
你把文字改成图片就行
里面有源码可以参考

与网页设计两行图片不同方向滚动相关的知识