1、怎麼製作網頁動態滾動文字...
用marquee即可
比如:
<marquee direction="right" behavior="scroll" scrollamount="10" scrolldelay="200">這是一個滾動字幕</marquee>
在裡面加入marquee裡面加入herf標簽,應該就能實現滾動鏈接裡面添加愛鏈接,marqueen之間也可以和資料庫連接
2、網頁中製作文字與圖片滾動效果
裡面的table自己改
我給你貼代碼
<div id=demo style="overflow:hidden; width:213px; height:100px;"> <div id=demo1>
<table width="336" border="0" cellpadding="0" cellspacing="0">
<%set rs=server.CreateObject("adodb.recordset")
sql="select top 10 * from news where lm2_id=146 order by id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.Write("<tr><td>無記錄</td></tr>")
else
for i=1 to rs.recordcount%>
<tr>
<td><a href="liang.asp?id=<%=rs("id")%>&lm=<%=Server.URLEncode("重要企業展台")%>"><%=left(rs("subject"),33)%></a>...</td>
</tr>
<%rs.movenext
next
end if%></table></div>
<div id=demo2></div>
</div> <script language="javascript">
var speed=30 // 值越大速度越慢
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetTop-demo.scrollTop<=0)
demo.scrollTop-=demo1.offsetHeight
else{
demo.scrollTop++
}
//上下左右無間隙滾動 最主要是 if 語句的代碼修改
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
3、如何製作網頁中的移動文字
<html>
<head><title>Dreamweaver滾動copy字幕的運用</title></head>
<body>
<marquee direction=left onmouseover="this.stop()" onmouseout="this.start()">
所要滾動的字幕(文字)
</marquee>
</body>
</html>
4、網頁設計:如何創建一個滾動菜單
首先打開dreamweaver8寫基本語法
<marquee>滾動文字 </marquee>
2.文字移動屬性的設置
(1)滾動方向屬性direction
可以設定文字滾動的方向,分別為向左(left)、向右(right)、向上(up)、向下(down),使滾動的文字具有更多的變化。
基本語法:
<marquee direction="value">滾動文字</marquee>
(2)滾動方式屬性behavior
通過這個屬性能夠設定不同方式的滾動文字效果。如滾動的循環往復、交替滾動、單次滾動等。
基本語法:
<marquee behavior="value">滾動文字</marquee>
(3)滾動循環屬性loop
通過這個屬性能夠讓文字滾動循環進行。
基本語法:
<marquee loop="次數">滾動文字</marquee>
(4)滾動速度屬性scrollamout
通過這個屬性能夠調整文字滾動的速度。
基本語法:
<marquee scrollamount="value">滾動文字</marquee>
(5)滾動延遲屬性scrolldelay
通過這個屬性,可以在每一次滾動的間隔產生一段時間的延遲。
基本語法:
<marquee scrolldelay="value">滾動文字</marquee>
3.外觀(Layout)設置
(1)滾動文字對齊方式align
基本語法:
<marquee align="對齊方ottom,對齊上沿、中間、下沿。
(2)滾動背景顏色屬性bgcolor
在滾動文字的後面,可以添加背式">滾動文字</marquee>
對方方式=top、middle、b景顏色。
基本語法:
<marquee bgcolor="color_value">滾動文字</marquee>
5、網頁設計字體滾動代碼?
文字滾動是由<marquee></marquee>控制的。marquee的參數如下:
1、方向 <direction=#> #=left, right
如:<marquee direction=left>啦啦啦,我從右向左移!</marquee>
<marquee direction=right>啦啦啦,我從左向右移!</marquee>
2、方式 <bihavior=#> #=scroll, slide, alternate
如:<marquee behavior=scroll>啦啦啦,我一圈一圈繞著走!</marquee>
<marquee behavior=slide>啦啦啦,我只走一次就歇了!</marquee>
<marquee behavior=alternate>啦啦啦,我來回走耶!</marquee>
3、循環 <loop=#> #=次數;若未指定則循環不止(infinite)
如:<marquee loop=3 width=50% behavior=scroll>啦啦啦,我只走 3 趟喲!</marquee>
<marquee loop=3 width=50% behavior=slide>啦啦啦,我只走 3 趟喲!</marquee>
<marquee loop=3 width=50% behavior=alternate>啦啦啦,我只走 3 趟喲!</marquee>
4、速度 <scrollamount=#>
如:<marquee scrollamount=20>啦啦啦,我走得好快喲!</marquee>
5、延時 <scrolldelay=#>
如: <marquee scrolldelay=500 scrollamount=100>啦啦啦,我走一步,停一停!</marquee>
6、對齊方式(Align) <align=#> #=top, middle, bottom
如:<font size=6>
<marquee align=# width=400>啦啦啦,我會移動耶!</marquee>
</font>
7、底色 <bgcolor=#>
#=rrggbb 16 進制數碼,或者是下列預定義色彩:
Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime,
Fuchsia, White, Green, Purple, Silver, Yellow, Aqua
如:<marquee bgcolor=aaaaee>啦啦啦,我會移動耶!</marquee>
8、面積 <height=# width=#>
如:<marquee height=40 width=50% bgcolor=aaeeaa> 啦啦啦,我會移動耶!</marquee>
9、空白(Margins)<hspace=# vspace=#>
<marquee id="scrollarea" direction="up" scrolldelay="10" scrollamount="1" width="150" height="80" onmouseover="this.stop();" onmouseout="this.start();">
------------------------------------------------------------------------------------------------------------------------------
<marquee></marquee>
以下是一個最簡單的例子:
代碼如下:
<marquee><font size=+3 color=red>Hello, World</font></marquee>
下面這兩個事件經常用到:
onMouseOut="this.start()" :用來設置滑鼠移出該區域時繼續滾動
onMouseOver="this.stop()":用來設置滑鼠移入該區域時停止滾動
代碼如下:
<marquee >onMouseOut="this.start()" :用來設置滑鼠移出該區域時繼續滾動 :用來設置滑鼠移入該區域時停止滾動</marquee>
這是一個完整的例子:
代碼如下:
<marquee align="left" behavior="scroll" bgcolor="#FF0000" direction="up" height="300" width="200" hspace="50" vspace="20" loop="-1" scrollamount="10" scrolldelay="100" >
這是一個完整的例子
</marquee>
該標簽支持的屬性多達11個:
align
設定<marquee>標簽內容的對齊方式
absbottom:絕對底部對齊(與g、p等字母的最下端對齊)
absmiddle:絕對中央對齊
baseline:底線對齊
bottom:底部對齊(默認)
left:左對齊
middle:中間對齊
right:右對齊
texttop:頂線對齊
top:頂部對齊
6、ASP網頁製作,怎樣使文字有滾動效果?
<marquee width="90%" id="paomadeng" onmouseover="this.stop()" onmouseout="this.start()" style="font-size=13px;color:blue" scrollamount="1" scrolldelay="1">把滾copy動文字放到這里</marquee>
7、html中如何製作隨著屏幕滾動的文字(就是會跟著屏幕走的文字)
圖片滾動代碼 (從右向左滾動)
<marquee scrollamount=1 scrolldelay=3 valign=middle behavior="scroll">
<img border="0" src=" http://要滾動的圖片地址1">
<img border="0" src=" http://要滾動的圖片地址2">
</marquee>
圖片滾動代碼 (從下往上滾動)
<marquee onMouseOver="this.stop()" onMouseOut="this.start()" align=center direction=up scrollamount=1 scrolldelay=3 valign=middle behavior="scroll">
<img border="0" src=" http://要滾動的圖片地址1">
<img border="0" src=" http://要滾動的圖片地址2"> <marquee ONMOUSEOUT=this.scrollDelay=1 ONMOUSEOVER=this.scrollDelay=600 scrollamount=1 SCROLLDELAY=1 border=0 direction=up scrolldelay=70 width=180 height=130 align=middle>
把圖片的連接地址寫在這里
</marquee>
1.direction屬性:決定文本的滾動方向,分為向左left和向右right,up和down默認狀態向左。
<marquee direction=left>從右向左滾動</marquee>
<marquee direction=right>從左向右滾動</marquee>
2.behavior屬性:指定文本的滾動方式,分為三種:
Scroll:從一端消失後,在另一端出現並繼續滾動。
<marquee behavior=scroll>一圈一圈地滾動</marquee>
Slide:從一端滾動,接觸到另一端後停止
<marquee behaviro=slide>只滾動一次就停止</marquee>
Alternate:從一端滾動到另一端後,反向滾動。
<marquee behavior=alternate>來回滾動</marquee>
direction=up(left、right、down) 這個屬性可以更改,這樣就可以實現上下左右了 但是.我建議用一種無縫的文字滾動.這樣的效果會比較好看.而用marquee就沒那麼好了方法代碼 先介紹一下它的實現思路:一個設定寬度並且隱藏超出它寬度的內容的容器demo,裡面放demo1和demo2,demo1是滾動內容,demo2為demo1的直接克隆,通過不斷改變demo1的scrollTop或者scrollLeft達到滾動的目的,當滾動至demo1與demo2的交界處時直接跳回初始位置,因為demo1與demo2一樣,所以分不出跳動的瞬間,從而達到「無縫」滾動的目的。
先了解一下對象的幾個的屬性:
innerHTML:設置或獲取位於對象起始和結束標簽內的 HTML
scrollHeight: 獲取對象的滾動高度。
scrollLeft:設置或獲取位於對象左邊界和窗口中目前可見內容的最左端之間的距離
scrollTop:設置或獲取位於對象最頂端和窗口中可見內容的最頂端之間的距離
scrollWidth:獲取對象的滾動寬度
offsetHeight:獲取對象相對於版面或由父坐標 offsetParent 屬性指定的父坐標的高度
offsetLeft:獲取對象相對於版面或由 offsetParent 屬性指定的父坐標的計算左側位置
offsetTop:獲取對象相對於版面或由 offsetTop 屬性指定的父坐標的計算頂端位置
offsetWidth:獲取對象相對於版面或由父坐標 offsetParent 屬性指定的父坐標的寬度
向上滾動的代碼:
<div id=demo style=overflow:hidden;height:400;width:160;background:#214984;color:#ffffff><table align=top cellpadding=0 cellspace=0 border=0><tr><td id=demo1 valign=top><img src="pic/1.jpg" width="156" height="200" /><br><img src="pic/2.jpg" width="160" height="198" /><br><img src="pic/3.jpg" width="155" height="200" /><br><img src="pic/4.jpg" width="157" height="200" /></td></tr><tr><td id=demo2 valign=top></td></tr></table></div>
<script>
var speed=30
demo2.innerHTML=demo1.innerHTML//克隆demo1為demo2
function Marquee(){
if(demo2.offsetHeight-demo.scrollTop<=0)//當滾動至demo1與demo2交界時
demo.scrollTop-=demo1.offsetHeight//demo跳到最頂端
else{
demo.scrollTop++
}
}
var MyMar=setInterval(Marquee,speed)//設置定時器
demo.onmouseover=function() {clearInterval(MyMar)}//滑鼠移上時清除定時器達到滾動停止的目的
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}//滑鼠移開時重設定時器
</script>
向下滾動:
<div id=demo style=overflow:hidden;height:400;width:160;background:#214984;color:#ffffff><table align=top cellpadding=0 cellspace=0 border=0><tr><td id=demo1 valign=top><img src="pic/1.jpg" width="156" height="200" /><br><img src="pic/2.jpg" width="160" height="198" /><br><img src="pic/3.jpg" width="155" height="200" /><br><img src="pic/4.jpg" width="157" height="200" /></td></tr><tr><td id=demo2 valign=top></td></tr></table></div>
<script>
var speed=30
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo.scrollTop<=0)
demo.scrollTop+=demo2.offsetHeight
else{
demo.scrollTop--
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
向左滾動:
<div id=demo style=overflow:hidden;height:200;width:500;background:#214984;color:#ffffff><table align=left cellpadding=0 cellspace=0 border=0><tr><td id=demo1 valign=top><img src="pic/1.jpg" width="156" height="200" /><img src="pic/2.jpg" width="160" height="198" /><img src="pic/3.jpg" width="155" height="200" /><img src="pic/4.jpg" width="157" height="200" /></td><td id=demo2 valign=top></td></tr></table></div>
<script>
var speed=30
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>
向右滾動:
<div id=demo style=overflow:hidden;height:200;width:500;background:#214984;color:#ffffff><table align=left cellpadding=0 cellspace=0 border=0><tr><td id=demo1 valign=top><img src="pic/1.jpg" width="156" height="200" /><img src="pic/2.jpg" width="160" height="198" /><img src="pic/3.jpg" width="155" height="200" /><img src="pic/4.jpg" width="157" height="200" /></td><td id=demo2 valign=top></td></tr></table></div>
<script>
var speed=30
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo.scrollLeft<=0)
demo.scrollLeft+=demo2.offsetWidth
else{
demo.scrollLeft--
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
8、如何製作網頁滾動文字
首先讓我們認識這個<marquee>標簽,它是成對出現的標簽,首標簽<marquee>和尾標簽</marquee>之間的內容就是滾動內容。<marquee>標簽的屬性主要有behavior、bgcolor、direction、width、height、hspace、vspace、loop、scrollamount、scrolldelay等,它們都是可選的。
behavior屬性
behavior屬性的參數值為alternate、scroll、slide中的一個,分別表示文字來回滾動、單方向循環滾動、只滾動一次,需要注意的是:如果在<marquee>標簽中同時出現了direction和behavior屬性,那麼scroll和slide的滾動方向將依照direction屬性中參數的設置。如下所示:
<marquee behavior="alternate">我來回滾動</marquee>
我來回滾動
<marquee behavior="scroll">我單方向循環滾動</marquee>
我單方向循環滾動
<marquee behavior="scroll" direction="up" height="30">我改單方向向上循環滾動</marquee>
我改單方向向上循環滾動
<marquee behavior="slide">我只滾動一次</marquee>
我只滾動一次
<marquee behavior="slide" direction="up">我改向上只滾動一次了</marquee>
我改向上滾動一次了
bgcolor屬性
文字滾動范圍的背景顏色,參數值是16進制(形式:#AABBCC或#AA5566等)或預定義的顏色名字(如red、yellow、blue等)。如下所示:
<marquee behavior=="slide" direction="left" bgcolor="red">我的背景色是紅色的</marquee>
我的背景色是紅色的
direction屬性
文字滾動的方向,屬性的參數值有down、left、right、up共四個單一可選值,分別代表滾動方向向下、向左、向右、向上。如下所示:
<marquee direction="right">我向右滾動</marquee>
我向右滾動
<marquee direction="right">我向下滾動</marquee>
我向下滾動
9、請高人指點:如何在網頁中製作滾動圖片和滾動字幕?需要詳細步驟以及那個代碼如何輸入?越詳細越好 謝謝
左右滾動<marquee direction= "height=134" scrollamount="2"
scrolldelay="10" " onmouseover=this.scrollAmount=0
onmouseout="this.scrollAmount=2"
scrolltop="0" top="0" scrollleft="20">
文字內容版文字內容文字內容文字內容文字內容文字內容文字內容
</marquee>
上下浮權動<marquee direction=up width=180 height=25 scrollamount=1
scrolldelay=1>文字內容文字內容文字內容文字內容文字內容
</marquee>
圖片就是把文字刪了中間插圖片呀
不知道你是做淘寶裝修用的還是其他,淘定裝修裡面可以查看代碼的,把這個貼在你想滾動的位置就可以了,寬高要設置好,是文字滾動區域的大小