当前位置: 首页 > 文档资料 > HaloJS 中文文档 >

textMarquee

优质
小牛编辑
127浏览
2023-12-01

功能

走马灯文字 – 水平

author leeenx
version 1.0.0
create: 2015-11-11

Official Usage

$("#container").textMarquee(
  {
    speed: 50
  }
);

Lazy Usage

$.textMarquee(
  {
    speed: 50,//移动的速度,单位为px/s option
    container: DOM, //文字走马灯的容器 option
    define: "halo_text_marquee" //自定义的属性名(halo_text_marquee为缺省值) option 如果有container,程序会自动忽略define。如果没有container,程序会获取带define 属性名的节点作为container
  }
);

Example

//结合页面带`halo_text_marquee`属性的节点,可以直接调用
$.textMarquee();

//指定容器
$("#textMarquee").textMarquee();

参数列表

name类型必选描述
speedintoptional移动速度,单位为px/s。默认值为50
containerstring/htmlElementoptional走马灯的容器。如果没指定,
代码会自动去寻找当前页面带define定义的属性的节点当做container
definestringoptional定义默认container容器

DEMO

点击查看textMarquee

模块下载

http://wq.360buyimg.com/js/ho2/min/uncmd.js
http://wq.360buyimg.com/js/ho2/min/prefix.js
http://wq.360buyimg.com/js/ho2/min/stylesheet.js
http://wq.360buyimg.com/js/ho2/min/isDom.js
http://wq.360buyimg.com/js/ho2/min/textMarquee.js