日期:2014-05-17  浏览次数:20616 次

求高手帮助,如何实现那种新闻动态规律的滚动的效果。
比如CSDN首页的那个资讯模块 旁边就有动态滚动效果,还有论坛首页也有那种滚动效果,我需要的效果就是跟那个一摸一样,定时规律的动态滚动,有没有高手有具体的demo,发给我的邮箱kf.cuiwenbin@huawei.com 或者直接把源码贴出来,记得附上js文件。小弟不胜感激

------解决方案--------------------
ajax+有热点新闻时,动态显示出即可。
好汉,还是自己改写一番,有不会之处,发贴询问,
没人会发你邮箱。
------解决方案--------------------
JScript code

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JavaScript封装的平滑图片滚动</title>
<style type="text/css">
body{ font-size:12px; color:#333;}
#picBox{width:610px; height:205px; margin:50px auto; overflow:hidden; position:relative;}
#picBox ul#show_pic{ margin:0; padding:0; list-style:none; height:205px; width:3050px; position:absolute;}
#picBox ul#show_pic li{ float:left; margin:0; padding:0; height:205px;}
#picBox ul#show_pic li img{ display:block;}
#icon_num{ position:absolute; bottom:0px; right:10px;}
#icon_num li{ float:left; background:url(http://pc.qq.com/pc/images/flashbutton.gif) no-repeat -15px 0;width:15px; height:15px; list-style:none; color:#39F; text-align:center;  cursor:pointer; padding:0; margin:0;margin-right:5px;}
#icon_num li:hover,#icon_num li.active{ background:url(http://pc.qq.com/pc/images/flashbutton.gif) no-repeat 0 0; color:#fff;}
#picBox_top{width:610px; height:205px; margin:50px auto; position:relative; overflow:hidden;}
#picBox_top ul#show_pic_top{ margin:0; padding:0; list-style:none; height:205px; width:610px; position:absolute;}
#picBox_top ul#show_pic_top li{ float:left; margin:0; padding:0; height:205px;}
#picBox_top ul#show_pic_top li img{ display:block;}
#icon_num_top{ position:absolute; bottom:0px; right:10px;}
#icon_num_top li{ float:left; background:url(http://pc.qq.com/pc/images/flashbutton.gif) no-repeat -15px 0;width:15px; height:15px; list-style:none; color:#39F; text-align:center;  cursor:pointer; padding:0; margin:0;margin-right:5px;}
#icon_num_top li:hover,#icon_num_top li.active{ background:url(http://pc.qq.com/pc/images/flashbutton.gif) no-repeat 0 0; color:#fff;}
</style>
</head>
<body>
<div id="picBox">
    <ul id="show_pic" style="left:0;">
        <li><img src="http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/3.gif" width="610" height="205" alt="" title="" /></li>
        <li><img src="http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/4.gif" width="610" height="205" alt="" title="" /></li>
        <li><img src="http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/5.gif" width="610" height="205" alt="" title="" /></li>
        <li><img src="http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/6.gif" width="610" height="205" alt="" title="" /></li>
        <li><img src="http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/7.gif" width="610" height="205" alt="" title="" /></li>
    </ul>
    <ul id="icon_num">
        <li class="active">1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
    </ul>
</div>
<script type="text/javascript">
/**
 *glide.layerGlide((oEventCont,oSlider,sSingleSize,sec,fSpeed,point);
 *@param auto type:bolean 是否自动滑动 当值是true的时候 为自动滑动
 *@param oEventCont type:object 包含事件点击对象的容器
 *@param oSlider type:object 滑动对象
 *@param sSingleSize type:number 滑动对象里单个元素的尺寸(width或者height)  尺寸是有point 决定
 *@param second type:number 自动滑动的延迟时间  单位/秒
 *@param fSpeed type:fl