導航:首頁 > 萬維百科 > 網頁設計兩行圖片不同方向滾動

網頁設計兩行圖片不同方向滾動

發布時間: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網頁製作中,我想弄兩行圖片同時進行循環滾動展播,插入第二個圖片滾動後,二個都不能用了,請教

這里有一個無縫滾動效果
方向可以自己設置
可以設置定高定寬停頓
你把文字改成圖片就行
裡面有源碼可以參考

與網頁設計兩行圖片不同方向滾動相關的知識