滚动文字代码(html文字滚动条代码_html常用代码大全)

发布时间:2025-12-10 19:51:06 浏览次数:9

html文字滚动条代码_html常用代码大全-滚动文字代码怎么设置

html文字滚动条代码_html常用代码大全实例一:经测试代码如下:滚动板body{font:12px/1″宋体”,SimSun,serif;background:#fff;color:#000;}.scrollUl{overflow:hidden;position:relative;}#scrollUlTest1{height:80px;}#scrollUlTest2{height:120px;}.scrollU…

实例一:

经测试代码如下:

滚动板

body { font: 12px/1 “宋体”,SimSun,serif; background:#fff; color:#000; }

.scrollUl { overflow:hidden; position:relative; }

#scrollUlTest1 {height:80px;}

#scrollUlTest2 {height:120px;}

.scrollUl ul,.scrollUl li { margin:0; padding:0; list-style:none outside; }

.scrollUl ul { position:absolute; }

.scrollUl li { height:20px; }

// containerId 滚动板外层节点的 ID

// numViews 分几屏滚动,需要滚动显示的总行数应该是分屏数的整倍数。

// showTime 每屏固定住时显示的时间,单位毫秒

// scrollTime 每次滚动一屏用的时间,单位毫秒

var ScrollUl=function(containerId,numViews,showTime,scrollTime) {

//定时器变量,因为有移到层上时停止滚动的事件处理,而那时可能还没开始定时器呢,所以先把这个变量声明出来。

this.timer=null;

this.numViews = numViews;

this.showTime = showTime;

this.scrollTime = scrollTime;

this.container &#

需要做网站?需要网络推广?欢迎咨询客户经理 13272073477