導航:首頁 > 萬維百科 > 網頁設計文字上下滾動

網頁設計文字上下滾動

發布時間:2021-02-15 15:21:18

1、設計網頁,要求文字上下左右交替滾動

網路一下應該有哪種案例的

2、網頁設計,怎麼設置一段文字從下往上滾動

<marquee scrollamount=2 direction="up">
<img src="**.jpg" alt="**" width="**" height="**" />
</marquee>

3、設計網頁,用滾動字幕顯示為:「xxxx」。 (要求文字上、下、左、右交替滾動)該怎麼寫代碼

上下交替滾動代碼:

<marquee behavior="alternate" direction="down" bgcolor="#aaaaee" align="middle" scrolldelay="120">歡迎您的光臨!</marquee>


左右交版替滾動代權碼:

<marquee behavior="alternate" direction="left" bgcolor="#aaaaee" align="middle" scrolldelay="120">歡迎您的光臨!</marquee>

4、在網站設計中:文字垂直向上滾動怎麼弄,求代碼、CSS,求詳解???

這段代碼你看下是不是你要的效果。如果不是可以繼續追問
<div style="width:200px; height:300px">
<marquee direction="up" truespeed="truespeed" height="300px" behavior="scroll">
<p></p>
<p></p>
<p></p></marquee></div>

5、網頁製作里表格中的文字上下滾動最簡單的代碼是什麼?

<MARQUEE onmouseover=this.stop() onmouseout=this.start()
scrollAmount=1 scrollDelay=1 direction=up height=140 width=150>
<span style="color:#D40F00"> 。。。。。。</span>
</MARQUEE>

點點的地方寫上文字。這個還可以調顏色和高度的。

6、文字向上滾動特效代碼--網頁設計

你看頁面源文件就知道啦!以下就是:

<script>
function scrollnews(){
var htext = document.getElementsByTagName("h1");
var text_holder = document.getElementById("newscommend");
var p = ["時尚","財經","房產","汽車","城市","科技","教育","軍事","公益","歷史","文化","讀書","游戲","體育","論壇","娛樂","佛教","商城"];
var purl = ["http://fashion.ifeng.com/","http://finance.ifeng.com/","http://house.ifeng.com/","http://auto.ifeng.com/","http://city.ifeng.com/","http://tech.ifeng.com/","http://e.ifeng.com/","http://news.ifeng.com/mil/","http://gongyi.ifeng.com/","http://news.ifeng.com/history/","http://book.ifeng.com/culture/","http://book.ifeng.com/","http://games.ifeng.com/","http://news.ifeng.com/sports/","http://bbs.ifeng.com/","http://ent.ifeng.com/","http://fo.ifeng.com/","http://vip.itv.ifeng.com/EShop/index.html"];
var oFrag = document.createDocumentFragment();
oFrag.innerHTML="";
for(var i=0;i<htext.length;i++){
oFrag.innerHTML+="<strong>[<a href="+purl[i]+" target=_blank>"+p[i]+"</a>]</strong> "+htext[i].innerHTML+"  ";
if((i>0 && i%2==1) || (i==htext.length-1 && i%2==0)){
oFrag.innerHTML+="<br/>";
}
}
text_holder.innerHTML=oFrag.innerHTML;
}
</script>

上面是腳本,你還要設置好Div層。自己研究下,不難的。

7、網頁設計文字滾動(水平)代碼

網頁設計文字滾動(水平)代碼是:

<marquee direction=up scrollamount=1 scrolldelay=100

height=60>

<!-- head_scrolltext -->

<tr>

<td>

共和國

</table> <!-- end head_scrolltext -->

</marquee>

(7)網頁設計文字上下滾動擴展資料:

一、除此之外,marquee參數有以下: 

BGColor:滾動文本框的背景顏色。 

Direction:滾動方向設置,可選擇Left、Right、up和down。 

scrolldelay:每輪滾動之間的延遲時間,越大越慢。 

scrollamount:一次滾動總的時間量,數字越小滾動越慢。 

Behaviour:滾動的方式設置,三種取值:Scroll(循環滾動) lide(單次滾動)、Alternate(來回滾動)。 

Align:文字的對齊方式設置。可選擇Middle(居中)、Bottom(居下)還是Top(居上)。 

Width:滾動文本框的寬度,輸入一個數值後從後面的單選框選擇in Pixels(按像素)或是in Percent(按百分比)。 

Height:滾動文本框的高度,輸入一個數值後從後面的單選框選擇in Pixels(按像素)或是in Percent(按百分比)。 

loop:滾動次數。默認為infinite 

hspace、vspace:前後、上下的空行。

二、滾動字幕在FrontPage的組件里有,但是FrontPage這個軟體只能支持單行文字,一出現多行文字它就無能為力了,而且它只能支持一行滾動。(如果出現只能滾動一行的情況,解決辦法是把這段代碼嵌入到JavaScript的document.write裡面。)

8、網頁設計字體滾動代碼?

文字滾動是由<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:頂部對齊

與網頁設計文字上下滾動相關的知識