zoukankan      html  css  js  c++  java
  • marquee 标签 文字滚动

    <!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>
    <font size="5" color="#cc0000"> 
    文字滚动示例(默认):<marquee>疏影横斜水清浅,暗香浮动月黄昏</marquee> 
    设置文字滚动的方向 <br />
    <marquee></marquee>标签的direction属性用于设置内容滚动方向,属性值有left、right、up、down,分别代表向左、向右、向上、向下,例如以下代码: 
    <marquee direction="left">疏影横斜水清浅,暗香浮动月黄昏</marquee> 
    <marquee direction="right">疏影横斜水清浅,暗香浮动月黄昏</marquee> 
    <marquee direction="up">疏影横斜水清浅,暗香浮动月黄昏</marquee> 
    <marquee direction="down">疏影横斜水清浅,暗香浮动月黄昏</marquee> 
    设置文字滚动的速度和形式 
    设置文字滚动使用<marquee></marquee>标签,其属性说明如下。 
    — <marquee></marquee>标签的scrollamount属性用于设置内容滚动速度。 
    — <marquee></marquee>标签的behavior 属性用于设置内容滚动方式,默认为scroll,即循环滚动,当其值为alternate时,内容将来回循环滚动。当其值为slide时,内容滚动一次即停止,不会循环。还有一个loop属性可设置其滚动循环次数,默认为没有限制。 
    — <marquee></marquee>标签的scrolldelay属性用于设置内容滚动的时间间隔。 
    — <marquee></marquee>标签的bgcolor属性用于设置内容滚动背景色(类似于body的背景色设置)。 
    — <marquee></marquee>标签的width 属性用于设置内容滚动背景宽度。 
    — <marquee></marquee>标签的height属性用于设置内容滚动背景高度。 
    文字滚动示例(向右):<marquee direction="right" scrolldelay="500">疏影横斜水清浅,暗香浮动月黄昏</marquee> 
    文字滚动示例(向下,滚动方式为slide,速度为10):<marquee scrollamount="10" behavior="slide">疏影横斜水清浅,暗香浮动月黄昏</marquee> 
    文字滚动示例(默认方向,滚动方式为alternate,循环3次,速度为2):<marquee scrollamount="2" behavior="alternate" loop="3">疏影横斜水清浅,暗香浮动月黄昏</marquee> 
    文字滚动示例(向上,背景色为#CCFF66,设置了背景宽度和高度):<marquee direction="up" bgcolor="#CCFF66" width="250" height="55">疏影横斜水清浅,暗香浮动月黄昏</marquee> 
    </font> 
    </body>
    </html>
  • 相关阅读:
    apache wicket 7.X让html回归webapp文件夹下
    HDU 4050 wolf5x (概率DP 求期望)
    struts2和数据库模糊查询
    codeforces 453A Little Pony and Expected Maximum 最大值期望
    挖坑
    BZOJ1430: 小猴打架
    BZOJ1672: [Usaco2005 Dec]Cleaning Shifts 清理牛棚
    1645: [Usaco2007 Open]City Horizon 城市地平线
    POJ1741 Tree
    CH Round #53-数据备份
  • 原文地址:https://www.cnblogs.com/20gg-com/p/6186965.html
Copyright © 2011-2022 走看看