关于首页最新新闻横向滚动代码问题的求助
因工作原因准备在网站专业增加最新5条新闻横向滚动的代码,现在可以滚动了,可是是分5行显示的,不能在同一行动态滚动显示,求助:handshake 代码如下:<div style="width:360px;overflow:hidden" onMouseOver="stop()" onMouseOut="start()">
<table width="360" border="0" cellspacing="0" cellpadding="0" id="scrollimg">
<tr>
<td id="simg"><table width="360" border="0" cellspacing="0" cellpadding="0">
<tr>
[color=Red] <td> $news(0,5,33,0,0,news)$</td>[/color]
</tr>
</table>
</td>
<td id="simg1"></td>
</tr>
</table>
</div>
<script language="JavaScript">
var tm=null
function newsScroll() {
if(scrollimg.parentNode.scrollLeft!=(scrollimg.clientWidth/2))
scrollimg.parentNode.scrollLeft++;
else
scrollimg.parentNode.scrollLeft=0
}
window.onload=function() {
simg1.innerHTML=simg.innerHTML
tm=setInterval('newsScroll()',10)
}
function stop()
{
clearInterval(tm)
}
function start()
{
tm=setInterval('newsScroll()',10)
}
</script>
不知错在哪里,请高手指点~ 这么精典的代码都写出来了... 如果我没记错的话
style.css 里面有
news li {}
这样一个
加入
float:left 这是我的css文件,刚才笑笑的办法无法实现:'( [quote].news{width:100%;margin:0px;}
.news ul{margin:0px;padding:0px;}
.news li{font-size:12px;line-height:16px;list-style:none;}
.news span{text-align:center;}
[/quote]
你搞丢了吧~~~
[quote].news li{font-size:12px;line-height:16px;list-style:none; [color=DarkRed]float:left; [/color] }[/quote] 会不会和../Config/Skinsclasscn.asp文件中
public sub news(isid,num,iwordsnum,iscontent,istime,newslist)
上面这个函数中的“& vbcrlf ”这个换行符有关呢? 那个是生成前的标签内容
你查看下生成的标签内容
首页会输出的
肯定是CSS的问题~~~
按照我上面说的
改CSS
页:
[1]
