Discuz 公告效果(自动换行,无间隙滚动)
ul {
padding-right: 0px;
padding-left: 0px;
padding-bottom: 0px;
margin: 0px;
padding-top: 0px
}
#announcement {
width:100%;
background:url(img/menu_bg.gif) repeat;
overflow: hidden;
}
#announcement div {
border: #e6e6e6 1px solid;
padding:0px 10px 0px 10px;
overflow-y:hidden;
line-height: 24px;
height: 24px
}
#announcement li {
font-size: 12px;
float: left;
list-style-type: none;
margin-right: 20px;
padding-left: 10px;
background: url(img/arrow_right.gif) no-repeat 0px 50%;
white-space: nowrap
}
#announcement a {
text-decoration: none;
}
#announcement a:hover {
text-decoration:underline;
}
- 分享个表单验证函数(2008-12-16 05:30 P.M.)
- 块级元素和级联元素的含义(2008-12-13 03:39 P.M.)
- 如何设置<span>的width属性且不换行??(2008-12-13 03:23 P.M.)
- 执行javascript后,gif动画就静止了??(2008-12-13 03:12 P.M.)
- 基于栅格地图的查询系统(切片缓存技术)(2008-11-29 07:38 P.M.)
- 【转】flash和javascript之间的通讯(javascript调用flash中的函数)(2008-11-27 07:45 P.M.)
- 不使用循环和回调函数输出字符1~100(2008-11-23 03:00 P.M.)
- 简洁的js图片等比缩放(2008-11-22 04:54 P.M.)
- 分贝网音乐地址获取器(2008-11-20 05:19 P.M.)
function $(id)
{
return document.getElementById(id);
}
var anndelay = 3000;
var anncount = 0;
var annheight = 24;
var annst = 0;
function announcementScroll()
{
if( ! annst)
{
$('announcementbody').innerHTML += '
' + $('announcementbody').innerHTML;
$('announcementbody').scrollTop = 0;
if($('announcementbody').scrollHeight > annheight * 3)
{
annst = setTimeout('announcementScroll()', anndelay);
}
else
{
$('announcement').onmouseover = $('announcement').onmouseout = null;
}
return;
}
if(anncount == annheight)
{
if($('announcementbody').scrollHeight - annheight
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]