zoukankan      html  css  js  c++  java
  • HTML经典标签用法


      1、marquee属性的使用说明

    <marquee> ... </marquee>
    移动属性的设置 ,这种移动不仅仅局限于文字,也可以应用于图片,表格等等
     

    鼠标属性

    onMouseOut=this.start() ........鼠标移出状态滚动

    onMouseOver=this.stop() .........鼠标经过时停止滚动

    方向
    <direction=#> #=left, right ,up ,down <marquee direction=left>从右向左移!</marquee>

    方式
    <bihavior=#> #=scroll, slide, alternate <marquee behavior=scroll>一圈一圈绕着走!</marquee>
    <marquee behavior=slide>只走一次就歇了!</marquee>
    <marquee behavior=alternate>来回走</marquee>

    循环
    <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>

    速度
    <scrollamount=#> <marquee scrollamount=20>啦啦啦,我走得好快哟!</marquee>

    延时
    <scrolldelay=#> <marquee scrolldelay=500 scrollamount=100>啦啦啦,我走一步,停一停!</marquee>

    外观(Layout)设置

    对齐方式(Align)
    <align=#> #=top, middle, bottom <font size=6>
    <marquee align=# width=400>啦啦啦,我会移动耶!</marquee>
    </font>

    底色
    <bgcolor=#> #=rrggbb 16 进制数码,或者是下列预定义色彩:
    Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime,
    Fuchsia, White, Green, Purple, Silver, Yellow, Aqua <marquee bgcolor=aaaaee>颜色!</marquee>

    面积
    <height=# width=#> <marquee height=40 width=50% bgcolor=aaeeaa>面积!</marquee>

    空白
    (Margins)<hspace=# vspace=#>
    <marquee hspace=20 vspace=20 width=150 bgcolor=ffaaaa align=middle>面积!</marquee>

     

     1 方向<direction=#> #=left, right ,up ,down <marquee direction=left>从右向左移!</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>
     4 
     5 
     6 <marquee loop=3 width=50% behavior=slide>只走 3 趟</marquee><marquee loop=3 width=50% behavior=alternate>只走 3 趟!</marquee>
     7 速度<scrollamount=#> <marquee scrollamount=20>啦啦啦,我走得好快哟!</marquee>
     8 延时<scrolldelay=#> <marquee scrolldelay=500 scrollamount=100>啦啦啦,我走一步,停一停!</marquee>
     9 外观(Layout)设置
    10 对齐方式(Align)<align=#> #=top, middle, bottom <font size=6><marquee align=# width=400>啦啦啦,我会移动耶!</marquee></font>
    11 底色<bgcolor=#> #=rrggbb 16 进制数码,或者是下列预定义色彩:Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime,Fuchsia, White, Green, Purple, Silver, Yellow, Aqua <marquee bgcolor=aaaaee>颜色!</marquee>
    12 面积<height=# width=#> <marquee height=40 width=50% bgcolor=aaeeaa>面积!</marquee>
    13 空白(Margins)<hspace=# vspace=#><marquee hspace=20 vspace=20 width=150 bgcolor=ffaaaa align=middle>面积!</marquee>
    从右向左移! 一圈一圈绕着走!只走一次就歇了!来回走 只走 3 趟 4 5 6 只走 3 趟只走 3 趟! 7 速度<scrollamount=#> 啦啦啦,我走得好快哟! 8 延时<scrolldelay=#> 啦啦啦,我走一步,停一停! 9 外观(Layout)设置 10 对齐方式(Align)<align=#> #=top, middle, bottom 啦啦啦,我会移动耶! 11 底色<bgcolor=#> #=rrggbb 16 进制数码,或者是下列预定义色彩:Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime,Fuchsia, White, Green, Purple, Silver, Yellow, Aqua 颜色! 12 面积<height=# width=#> 面积! 13 空白(Margins)<hspace=# vspace=#>面积! <direction=#> #=left, right ,up ,down 从右向左移!

     
    ::marquee|各种文字滚动代码(适用公告) 

     

       1.建立第一个滚动字幕。代码:
    <marquee scrollAmount=2 width=300>我钟意网页树树</marquee>
    效果如: 我钟意网页树树

        2.各参数详解:
    a)scrollAmount。它表示速度,值越大速度越快。如果没有它,默认为6,建议设为1~3比较好。
    b)width和height,表示滚动区域的大小,width是宽度,height是高度。特别是在做垂直滚动的时候,一定要设height的值。
    c)direction。表示滚动的方向,默认为从右向左:←←←。可选的值有right、down、up。滚动方向分别为:right表示→→→,up表示↑,down表示↓。
    d)scrollDelay,这也是用来控制速度的,默认为90,值越大,速度越慢。通常scrollDelay是不需要设置的。
    e)behavior。用它来控制属性,默认为循环滚动,可选的值有alternate(交替滚动)、slide(幻灯片效果,指的是滚动一次,然后停止滚动)

       3.实例:
        a)如何给滚动字幕加超链接?这跟平时的超链接是完全一样 的。只要在文字外面加上<a href=***>和</a>就可以了。如下效果,代码是<marquee scrollAmount=2 width=300><a href=http://www.cctv.com>中央电视台</a></marquee>,点击中央电视台就可以进入 了:
    中央电视台

         b)如何制作当鼠标停留在文字上,文字停止滚动?
    代码如:
    <marquee scrollAmount=2 width=300 onmouseover=stop() onmouseout=start()>文字内容</marquee>
    效果如:
    文字内容

    c)交替效果。代码如:
    <marquee scrollAmount=2 width=99 behavior=alternate>文字内容</marquee>
    效果如:
    文字内容

         d)多行文本向上滚动。代码如:
    <marquee scrollAmount=2 width=300 height=160 direction=up>·早晨好啊!<br>·空气好清新啊<br>·今朝食乜好呢?<p>·<a href=http://www.cctv.com>中央电视台</a></marquee>
    效果如:
    ·早晨好啊!
    ·空气好清新啊
    ·今朝食乜好呢?

    ·中央电视台

     

        ·注意:如果你的网页经过了FrontPage编辑,保存之后,只能滚动一行,这时候你发现你原来的代码顺序已经变了,My god!解决的办法是,找出原来的代码,把它嵌入到JavaScript的document.write中即可,上述代码写为:
    <script>document.write('<marquee scrollAmount=2 width=300 height=160 direction=up>·早晨好啊!<br>·空气好清新啊<br>·今朝食乜好呢?<p>·<a href=http://www.cctv.com>中央电视台</a></marquee>')< /script>

    e)改变滚动字幕的颜色?可以用样式表来控制。如下效果,代码是<marquee scrollAmount=2 width=300><a style=color:CC6600>我钟意网页树树!</a></marquee>。
    我钟意网页树树!


    此篇文章属于转载:请访问出处:http://x.discuz.net/200278/viewspace-3737

     

  • 相关阅读:
    快速排序算法
    HTTP中的重定向和请求转发的区别
    单链表的逆置(头插法和就地逆置)
    水仙花数学习
    构建n位元的格雷码
    算法学习day01 栈和队列
    数据结构学习总结 线性表之双向链表
    设计模式
    Nginx 初步认识
    数据结构学习总结(2) 线性表之单链表
  • 原文地址:https://www.cnblogs.com/douglas0126x/p/4973072.html
Copyright © 2011-2022 走看看