导航:首页 > 万维百科 > 网页设计文字上下滚动

网页设计文字上下滚动

发布时间: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:顶部对齐

与网页设计文字上下滚动相关的知识