• marquee标签滚动效果



    <marquee></marquee>标签,默认从最右侧往左滚动;

    direction:设置滚动的方向;

    height:设置标签高度, 设置标签宽度;

    behavior="aletrnate": 一次全部出现,碰到边缘来回撞;

    behavior="slide" :一次全部出现,碰到边缘停住;

    behavior="scroll" :默认无限循环 loop="3":循环3次,设置循环的次数;

    设置速度的两个属性: scrollamount="30" 每次移动30像素;scrolldelay="500" 0.5秒移动一次;

    hspace:水平方向空多少,设置是左右都空的;

    vapace:纵向空多少。要跟宽度高度一起来使用;

    bgcolor: 滚动背景颜色

    代码示例:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    </head>
    
    <body>
    <div>
    <marquee direction="up" behavior="scroll" scrollamount="1" scrolldelay="0" loop="3" width="1000" height="50" bgcolor="#0099FF" hspace="10" vspace="10">
    指整个Marquee对齐方式; (2)behavior:设置滚动的方式: scroll:表示由一端滚动到另一端,会重复,缺陷是不能无缝滚动。 slide:表示由一段滚动到另一端,不会重复...
    </marquee>
    </div>
    </body>
    </html>
  • 相关阅读:
    CF 142B Tprimes
    CF 231A Team
    poj 2001 Shortest Prefixes ——字典树入门
    hdu 1039 Easier Done Than Said?
    poj 2528 Mayor's posters
    hdu 1061 Rightmost Digit
    poj 2503 Babelfish
    CF271 A. Beautiful Year
    poj 2752
    CF271 B. Prime Matrix
  • 原文地址:https://www.cnblogs.com/hq233/p/6127678.html
Copyright © 2020-2023  润新知