足球游戏_中国足彩网¥体育资讯$

htmlmarquee标签使用示例介绍
来源:易贤网 阅读:760 次 日期:2016-06-17 10:08:40
温馨提示:易贤网小编为您整理了“htmlmarquee标签使用示例介绍”,方便广大网友查阅!

语法:

<marquee></marquee>

以下是一个最简单的例子:

代码如下:

<marquee><fontsize=+3color=red>hello,world</font></marquee>

下面这两个事件经常用到:

onmouseout=this.start():用来设置鼠标移出该区域时继续滚动

onmouseover=this.stop():用来设置鼠标移入该区域时停止滚动

代码如下:

<marqueeonmouseout=this.start()onmouseover=this.stop()>onmouseout=this.start():用来设置鼠标移出该区域时继续滚动onmouseover=this.stop():用来设置鼠标移入该区域时停止滚动</marquee>

这是一个完整的例子:

代码如下:

<marqueeid=affichealign=leftbehavior=scrollbgcolor=#ff0000direction=upheight=300width=200hspace=50vspace=20loop=-1scrollamount=10scrolldelay=100onmouseout=this.start()onmouseover=this.stop()>

这是一个完整的例子

</marquee>

该标签支持的属性多达11个:

align

设定<marquee>标签内容的对齐方式

absbottom:绝对底部对齐(与g、p等字母的最下端对齐)

absmiddle:绝对中央对齐

baseline:底线对齐

bottom:底部对齐(默认)

left:左对齐

middle:中间对齐

right:右对齐

texttop:顶线对齐

top:顶部对齐

代码如下:

<marqueealign=absbottom>align=absbottom:绝对底部对齐(与g、p等字母的最下端对齐)。</marquee>

<marqueealign=absmiddle>align=absmiddle:绝对中央对齐。</marquee>

<marqueealign=baseline>align=baseline:底线对齐。</marquee>

<marqueealign=bottom>align=bottom:底部对齐(默认)。</marquee>

<marqueealign=left>align=left:左对齐。</marquee>

<marqueealign=middle>align=middle:中间对齐。</marquee>

<marqueealign=right>align=right:右对齐。</marquee>

<marqueealign=texttop>align=texttop:顶线对齐。</marquee>

<marqueealign=top>align=top:顶部对齐。</marquee>

behavior

设定滚动的方式:

alternate:表示在两端之间来回滚动。

scroll:表示由一端滚动到另一端,会重复。

slide:表示由一端滚动到另一端,不会重复。

代码如下:

<marqueebehavior=alternate>alternate:表示在两端之间来回滚动。</marquee>

<marqueebehavior=scroll>scroll:表示由一端滚动到另一端,会重复。</marquee>

<marqueebehavior=slide>slide:表示由一端滚动到另一端,不会重复。</marquee>

bgcolor

设定活动字幕的背景颜色,背景颜色可用rgb、16进制值的格式或颜色名称来设定。

代码如下:

<marqueebgcolor=#006699>设定活动字幕的背景颜色bgcolor=#006699</marquee>

<marqueebgcolor=rgb(10%,50%,100%,)>设定活动字幕的背景颜色bgcolor=rgb(10%,50%,100%,)</marquee>

<marqueebgcolor=red>设定活动字幕的背景颜色bgcolor=red</marquee>

direction

设定活动字幕的滚动方向

代码如下:

复制代码代码如下:

<marqueedirection=down>设定活动字幕的滚动方向direction=down:向下</marquee>

<marqueedirection=left>设定活动字幕的滚动方向direction=left:向左</marquee>

<marqueedirection=right>设定活动字幕的滚动方向direction=right:向右</marquee>

<marqueedirection=up>设定活动字幕的滚动方向direction=up:向上</marquee>

height

设定活动字幕的高度

代码如下:

<marqueeheight=500direction=downbgcolor=#cccccc>设定活动字幕的高度height=500</marquee>

width

设定活动字幕的宽度

代码如下:

复制代码代码如下:

<marqueewidth=500bgcolor=#cccccc>设定活动字幕的宽度width=500</marquee>

hspace

设定活动字幕里所在的位置距离父容器水平边框的距离

thiscontrolsthehorizontal(水平)spacearoundthedisplaybox.

码代码如下:

<tablewidth=500border=1align=centercellpadding=0cellspacing=0>

<tr>

<td><marqueehspace=100bgcolor=#cccccc>hspace=100</marquee></td>

</tr>

</table>

vspace

设定活动字幕里所在的位置距离父容器垂直边框的距离

thiscontrolsthevertical(垂直)spacearoundthedisplaybox.

代码如下:

<marqueevspace=100bgcolor=#cccccc>hspace=100</marquee>

loop

设定滚动的次数,当loop=-1表示一直滚动下去,默认为-1

代码如下:

<marqueeloop=-1bgcolor=#cccccc>我会不停地走。</marquee>

<p>&nbsp;</p>

<marqueeloop=2bgcolor=#cccccc>我只走两次哦</marquee>

scrollamount

设定活动字幕的滚动速度,单位pixels

代码如下:

<marqueescrollamount=10>scrollamount=10</marquee>

<marqueescrollamount=20>scrollamount=20</marquee>

<marqueescrollamount=30>scrollamount=30</marquee>

scrolldelay

设定活动字幕滚动两次之间的延迟时间,单位millisecond(毫秒)

值大了会有一步一停顿的效果

代码如下:

<marqueescrolldelay=10>scrolldelay=10</marquee>

<marqueescrolldelay=100>scrolldelay=100</marquee>

<marqueescrolldelay=1000>scrolldelay=1000</marquee>

中国足彩网信息请查看网页制作
易贤网手机网站地址:htmlmarquee标签使用示例介绍
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 足球游戏_中国足彩网¥体育资讯$ 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65317125(9:00—18:00) 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标