In-depth analysis of the marquee attribute in html

怪我咯
Release: 2017-05-07 11:55:32
Original
1231 people have browsed it

This article mainly introduces relevant information about the marquee attribute in HTML. Friends who need it can refer to it

This tag is not part of HTML3.2, and only supports the kernel after MSIE3, so if you Using non-IE core browsers (such as Netscape) may not be able to see some of the following interesting effects

This tag is a container tag

Syntax:

Copy after login

The following is the simplest example:

The code is as follows:

Hello, World
Copy after login

The following two events Frequently used:

onMouseOut="this.start()": used to set the mouse to continue scrolling when it moves out of the area

onMouseOver="this.stop()": used to set the mouse Stop scrolling when moving into the area

The code is as follows:

onMouseOut="this.start()" :用来设置鼠标移出该区域时继续滚动 onMouseOver="this.stop()":用来设置鼠标移入该区域时停止滚动
Copy after login

This is a complete example:

The code is as follows:

 这是一个完整的例子 
Copy after login

This tag supports up to 11 attributes:

align

Set the alignment of tag content

absbottom: Absolute bottom alignment (aligned with the bottom of letters such as g, p, etc.)
absmiddle: Absolute center alignment
baseline: Bottom line alignment
bottom: bottom alignment (default)
left: left alignment
middle: middle alignment
right: right alignment
texttop: top line alignment
top: top alignment

The code is as follows:

align="absbottom":绝对底部对齐(与g、p等字母的最下端对齐)。  align="absmiddle": 绝对中央对齐。  align="baseline": 底线对齐。  align="bottom": 底部对齐(默认)。  align="left": 左对齐。  align="middle": 中间对齐。  align="right": 右对齐。  align="texttop": 顶线对齐。  align="top": 顶部对齐。 
Copy after login

behavior

Set the scrolling method:

alternate : Indicates scrolling back and forth between the two ends.

scroll: Indicates scrolling from one end to the other end and will be repeated.

slide: means scrolling from one end to the other without repetition.

The code is as follows:

alternate:表示在两端之间来回滚动。  scroll:表示由一端滚动到另一端,会重复。 slide: 表示由一端滚动到另一端,不会重复。
Copy after login

bgcolor

Set the background color of active subtitles, background Colors can be set in RGB, hexadecimal value format, or color names.

The code is as follows:

设定活动字幕的背景颜色 bgcolor="#006699" 设定活动字幕的背景颜色 bgcolor="rgb(10%,50%,100%,)" 设定活动字幕的背景颜色 bgcolor="red"
Copy after login

direction

Set the scrolling direction of active subtitles

The code is as follows:

设定活动字幕的滚动方向direction="down":向下 设定活动字幕的滚动方向direction="left":向左 设定活动字幕的滚动方向direction="right":向右 设定活动字幕的滚动方向direction="up":向上
Copy after login

height

Set the height of active subtitles

The code is as follows:

设定活动字幕的高度height="500"
Copy after login

width

Set the width of active subtitles

The code is as follows :

设定活动字幕的宽度width="500"
Copy after login

hspace

Set the distance between the active subtitle position and the horizontal border of the parent container

This controls the horizontal (horizontal) space around the display box.

The code is as follows:

hspace="100"
Copy after login

vspace

Set the distance between the position of the active subtitles and the vertical border of the parent container

This controls the vertical (vertical) space around the display box.

The code is as follows :

hspace="100"
Copy after login

loop

Set the number of times to scroll. When loop=-1, it means scrolling all the time. The default is The code for -1

is as follows:

我会不停地走。 

我只走两次哦
Copy after login

scrollamount

Set the scrolling of active subtitles Speed, unit pixels

The code is as follows:

scrollamount="10"  scrollamount="20"  scrollamount="30" 
Copy after login

##scrolldelay

Set active subtitle scrolling Delay time between two times, unit millisecond (millisecond)

If the value is large, it will have the effect of one step and one pause.

The code is as follows:

scrolldelay="10"   scrolldelay="100" scrolldelay="1000" 
Copy after login


The above is the detailed content of In-depth analysis of the marquee attribute in html. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
javascript - html废弃标签标签对android图形化渲染的影响? 问题:做一个跑马灯效果--文字无缝滚动,在安卓的www目录下跑的html/js。使用marquee便签导致同页面的高清视频声音图片不同步、然后卡顿。 代码: {代码...}
From 2017-04-11 12:49:17
0
1
511
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!