在html中marquee什么意思

lxf2023-03-14 13:54:01

在html中,marquee的意思为“滚动”,可以用来插入一段滚动的文字,语法“<marquee>文字内容</marquee>”;marquee标签支持多种属性,用户可以使用这些属性控制当文本到达容器边缘发生的事情。

在html中marquee什么意思

本教程操作环境:windows7系统、HTML5版、Dell G3电脑。

在html中,marquee的意思为“滚动”。marquee 元素(<marquee>) 用来插入一段滚动的文字。

marquee标签支持多种属性,用户可以使用这些属性控制当文本到达容器边缘发生的事情。

  • behavior

    设置文本在 marquee 元素内如何滚动。可选值有 scroll,slide 和 alternate。 如果未指定值,默认值为 scroll。

  • bgcolor

    通过颜色名称或十六进制值设置背景颜色。

  • direction

    设置 marquee 内文本滚动的方向。可选值有 left, right, up and down。如果未指定值,默认值为 left。

  • height

    以像素或百分比值设置高度。

  • hspace

    设置水平边距。

  • loop

    设置 marquee 滚动的次数。如果未指定值,默认值为 −1,表示 marquee 将连续滚动.

  • scrollamount

    设置每次滚动时移动的长度(以像素为单位)。默认值为 6。

  • scrolldelay

    设置每次滚动时的时间间隔(以毫秒为单位)。默认值为 85。请注意, 除非指定 truespeed 值,否则将忽略任何小于 60 的值,并改为使用 60。

  • truespeed

    默认情况下,会忽略小于60的scrolldelay值。如果存在truespeed,那些值不会被忽略。

  • vspace

    以像素或百分比值设置垂直边距。

  • width

    以像素或百分比值设置宽度。

示例:

<marquee>This text will scroll from right to left</marquee>

<marquee direction="up">This text will scroll from bottom to top</marquee>

<marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid">
  <marquee behavior="alternate">
    This text will bounce
  </marquee>
</marquee>

在html中marquee什么意思

推荐教程:《html视频教程》

以上就是在html中marquee什么意思的详细内容,更多请关注AdminJS其它相关文章!