zoukankan      html  css  js  c++  java
  • marquee标签的使用

    marquee语法
        <marquee></marquee>

    实例一
    <marquee>Hello, World</marquee>

    marquee常用到的两个事件:
    onMouseOut="this.start()" 当鼠标移出该区域时
    onMouseOver="this.stop()" 当鼠标移入该区域时

    实例二
    <marquee onMouseOut="this.start()" onMouseOver="this.stop()">marquee常用到的两个事件</marquee>


    下面开始说一下marquee所支持的属性


    beha
    vior设定滚动的方式:
        alternate:来回滚动。

        scroll:   重复滚动。
        slide:    不重复滚动。

    代码如下:

    <marquee behavior="alternate">来回滚动。 </marquee>

    <marquee behavior="scroll">重复滚动。</marquee>

    <marquee behavior="slide">不重复滚动。</marquee>

     

    bgcolor设定活动字幕的背景颜色。

    代码如下:

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

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

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

     

    direction设定活动字幕的滚动方向

    代码如下:

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

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

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

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

     

    height设定活动字幕的高度

    代码如下:

    <marquee height="500" direction="down" bgcolor="#CCCCCC">设定活动字幕的高度</marquee>

     

    width设定活动字幕的宽度

    代码如下:

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

     

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

    代码如下:

    <marquee loop="-1" bgcolor="#CCCCCC">我会不停地走。</marquee>

    <marquee loop="2" bgcolor="#CCCCCC">我只走两次哦</marquee>

     

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

    代码如下:

    <marquee scrollamount="10" >scrollamount="10" </marquee>

    <marquee scrollamount="20" >scrollamount="20" </marquee>

    <marquee scrollamount="30" >scrollamount="30" </marquee>

     

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

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

    代码如下:

    <marquee scrolldelay="10" >scrolldelay="10" </marquee>

    <marquee scrolldelay="100" > scrolldelay="100"</marquee>

    <marquee scrolldelay="1000">scrolldelay="1000" </marquee>

  • 相关阅读:
    如何优化数据库中数据的查询
    2句sql语句的比较
    未来五年程序员应当具备的十项技能
    中小IT企业如何留住80后技术人才
    ORACLE的sign函数和DECODE函数
    Windows Server 2008系统 安装Oracle 10g 错误
    ORACLE 错误 ora01830 解决方法
    oracle instr函数
    Oracle 9i安装时没有找到OCS4J.properties 解决办法
    C# 中的委托和事件
  • 原文地址:https://www.cnblogs.com/F4natasy/p/6944817.html
Copyright © 2011-2022 走看看