<% sql = "select top 15 * from pro_show where class_path like '%199%' order by id desc "
Set rs = Server.CreateObject("ADODB.Recordset")
  rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.Write("暂无内容")
else
do while not rs.eof or rs.bof 
response.Write("<a href='' ><img width=115 height=90 src='admin/"&rs("pro_img")&"' alt=""图片"" />"&left(rs("pro_title"),11)&"</a>")
rs.movenext
loop
end if
%>中间输出的方式是<li><img src="" /></br> <a href="">文字</a></li>图片如下和文字左滚动:

解决方案 »

  1.   

    http://www.popub.net/script/MSClass.html
      

  2.   


    <div id=demo style="overflow:hidden;height:100px;width:300px;">
    <table align=left cellpadding=0 cellspace=0 border=0>
        <tr>
             <td id=demo1 valign=top></td>
             <td id=demo2 valign=top></td>
        </tr>
    </table>
    </div> <script> 
    var speed=30 
    demo2.innerHTML=demo1.innerHTML 
    function Marquee(){ 
    if(demo2.offsetWidth-demo.scrollLeft<=0) 
    demo.scrollLeft-=demo1.offsetWidth 
    else{ 
    demo.scrollLeft++ 


    var MyMar=setInterval(Marquee,speed) 
    demo.onmouseover=function() {clearInterval(MyMar)} 
    demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} 
    </script>
    把内容放到demo1里就可以了
      

  3.   

    图片无缝滚动代码先介绍一下它的实现思路:一个设定宽度并且隐藏超出它宽度的内容的容器demo,里面放demo1和demo2,demo1是滚动内容,demo2为demo1的直接克隆,通过不断改变demo1的scrollTop或者scrollLeft达到滚动的目的,当滚动至demo1与demo2的交界处时直接跳回初始位置,因为demo1与demo2一样,所以分不出跳动的瞬间,从而达到“无缝”滚动的目的。先了解一下对象的几个的属性:
    innerHTML:设置或获取位于对象起始和结束标签内的 HTML
    scrollHeight: 获取对象的滚动高度。
    scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离
    scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
    scrollWidth:获取对象的滚动宽度
    offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度
    offsetLeft:获取对象相对于版面或由 offsetParent 属性指定的父坐标的计算左侧位置
    offsetTop:获取对象相对于版面或由 offsetTop 属性指定的父坐标的计算顶端位置
    offsetWidth:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的宽度
    向上滚动的代码:
    <div id=demo style=overflow:hidden;height:400;width:160;background:#214984;color:#ffffff><table align=top cellpadding=0 cellspace=0 border=0><tr><td id=demo1 valign=top><img src="pic/1.jpg" width="156" height="200" /><br><img src="pic/2.jpg" width="160" height="198" /><br><img src="pic/3.jpg" width="155" height="200" /><br><img src="pic/4.jpg" width="157" height="200" /></td></tr><tr><td id=demo2 valign=top></td></tr></table></div>
    <script>
    var speed=30
    demo2.innerHTML=demo1.innerHTML//克隆demo1为demo2
    function Marquee(){
    if(demo2.offsetHeight-demo.scrollTop<=0)//当滚动至demo1与demo2交界时
    demo.scrollTop-=demo1.offsetHeight//demo跳到最顶端
    else{
    demo.scrollTop++
    }
    }
    var MyMar=setInterval(Marquee,speed)//设置定时器
    demo.onmouseover=function() {clearInterval(MyMar)}//鼠标移上时清除定时器达到滚动停止的目的
    demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}//鼠标移开时重设定时器
    </script>
    向下滚动:
    <div id=demo style=overflow:hidden;height:400;width:160;background:#214984;color:#ffffff><table align=top cellpadding=0 cellspace=0 border=0><tr><td id=demo1 valign=top><img src="pic/1.jpg" width="156" height="200" /><br><img src="pic/2.jpg" width="160" height="198" /><br><img src="pic/3.jpg" width="155" height="200" /><br><img src="pic/4.jpg" width="157" height="200" /></td></tr><tr><td id=demo2 valign=top></td></tr></table></div>
    <script>
    var speed=30
    demo2.innerHTML=demo1.innerHTML
    function Marquee(){
    if(demo.scrollTop<=0)
    demo.scrollTop+=demo2.offsetHeight
    else{
    demo.scrollTop--
    }
    }
    var MyMar=setInterval(Marquee,speed)
    demo.onmouseover=function() {clearInterval(MyMar)}
    demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
    </script>
    向左滚动:
    <div id=demo style=overflow:hidden;height:200;width:500;background:#214984;color:#ffffff><table align=left cellpadding=0 cellspace=0 border=0><tr><td id=demo1 valign=top><img src="pic/1.jpg" width="156" height="200" /><img src="pic/2.jpg" width="160" height="198" /><img src="pic/3.jpg" width="155" height="200" /><img src="pic/4.jpg" width="157" height="200" /></td><td id=demo2 valign=top></td></tr></table></div>
    <script>
    var speed=30
    demo2.innerHTML=demo1.innerHTML
    function Marquee(){
    if(demo2.offsetWidth-demo.scrollLeft<=0)
    demo.scrollLeft-=demo1.offsetWidth
    else{
    demo.scrollLeft++
    }
    }
    var MyMar=setInterval(Marquee,speed)
    demo.onmouseover=function() {clearInterval(MyMar)}
    demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
    </script>向右滚动:
    <div id=demo style=overflow:hidden;height:200;width:500;background:#214984;color:#ffffff><table align=left cellpadding=0 cellspace=0 border=0><tr><td id=demo1 valign=top><img src="pic/1.jpg" width="156" height="200" /><img src="pic/2.jpg" width="160" height="198" /><img src="pic/3.jpg" width="155" height="200" /><img src="pic/4.jpg" width="157" height="200" /></td><td id=demo2 valign=top></td></tr></table></div>
    <script>
    var speed=30
    demo2.innerHTML=demo1.innerHTML
    function Marquee(){
    if(demo.scrollLeft<=0)
    demo.scrollLeft+=demo2.offsetWidth
    else{
    demo.scrollLeft--
    }
    }
    var MyMar=setInterval(Marquee,speed)
    demo.onmouseover=function() {clearInterval(MyMar)}
    demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
    </script>
      

  4.   


    文字描述:
    要滚动的内容 使用dom.clone复制一份
    然后将原内容和复制内容根据滚动方向串联排列,
    之后 就是 通过定时器 循环设置整个串联内容的margin-left偏移
    当偏移值 大于等于 原始内容的宽度时候 设置偏移值 归0
      

  5.   

    <html>
    <head>
        <title></title>
        <script language="javascript" type="text/javascript">
            function VScrollPanel() {
                this.width = null;
                this.height = null;
                this.delay = 100;
                this.step = 1;
            }
            VScrollPanel.prototype = {
                Bind: function (domID) {
                    this.dom = document.getElementById(domID);
                    if (this.width) {
                        this.dom.style.width = this.width + "px";
                    }
                    if (this.height) {
                        this.dom.style.height = this.height + "px";
                    }
                    this.dom.style.overflow = "hidden";                this.Scrolling();
                },
                Scrolling: function () {
                    if (this.dom.scrollHeight <= this.dom.clientHeight) return;
                    if (this.willSwap) {
                        this.dom.appendChild(this.lastOne);
                        this.willSwap = false;
                    }
                    var _this = this;
                    this.dom.scrollTop += this.step;
                    if (this.dom.scrollTop + this.dom.clientHeight
                        >= this.dom.scrollHeight) {//到达底部
                        if (this.tmp != null) this.dom.removeChild(this.tmp);
                        this.lastOne = this.dom.firstChild;
                        this.tmp = this.lastOne.cloneNode(true);
                        this.lastOne.replaceNode(this.tmp);
                        this.willSwap = true;
                    }
                    setTimeout(function () { _this.Scrolling(); }, this.delay);
                },
                Pause: function () {
                    this.pauseStep = this.step;
                    this.step = 0;
                },
                Continue: function () {
                    this.step = this.pauseStep;
                }
            };        /*经过多次实验,水平滚动通过新建一个表格来设置布局
            才能最有效的保证布局不会乱,不会发生换行
            所以只好水平、垂直滚动的分开做了*/
            function HScrollPanel() {
                this.width = null;
                this.height = null;
                this.delay = 100;
                this.step = 1;
            }
            HScrollPanel.prototype = {
                Bind: function (domID) {
                    this.dom = document.getElementById(domID);
                    this.rootDom = document.createElement("table");
                    this.rootDom.border = "0";
                    this.rootDom.cellPadding = "0";
                    this.rootDom.cellSpacing = "0";
                    var tbody = document.createElement("tbody");
                    this.rootDom.appendChild(tbody);
                    this.row = document.createElement("tr");
                    tbody.appendChild(this.row);                var child = this.dom.firstChild;
                    while (child != null) {
                        this.dom.removeChild(child);
                        if (child.nodeType == 1) {
                            var td = document.createElement("td");
                            td.vAlign = "top";
                            td.appendChild(child);
                            this.row.appendChild(td);
                        }
                        child = this.dom.firstChild;
                    }
                    this.dom.appendChild(this.rootDom);                if (this.width) {
                        this.dom.style.width = this.width + "px";
                    }
                    if (this.height) {
                        this.dom.style.height = this.height + "px";
                    }
                    this.dom.style.overflow = "hidden";
                    this.Scrolling();
                },
                Scrolling: function () {
                    if (this.dom.scrollWidth <= this.dom.clientWidth) return;
                    if (this.willSwap) {
                        this.row.appendChild(this.lastOne);
                        this.willSwap = false;
                    }
                    var _this = this;
                    this.dom.scrollLeft += this.step;
                    if (this.dom.scrollLeft + this.dom.clientWidth
                        >= this.dom.scrollWidth) {
                        if (this.tmp != null) {
                            this.row.removeChild(this.tmp);
                        }
                        this.lastOne = this.row.firstChild;
                        this.tmp = this.lastOne.cloneNode(true);
                        this.lastOne.replaceNode(this.tmp);
                        this.willSwap = true;
                    }
                    setTimeout(function () { _this.Scrolling(); }, this.delay);
                },
                Pause: function () {
                    this.pauseStep = this.step;
                    this.step = 0;
                },
                Continue: function () {
                    this.step = this.pauseStep;
                }
            };
        </script>
        <style type="text/css">
            body,td
            {
                font-family:"宋体";
                font-size:12px;
            }
            .item
            {
                width:150px;
                background-color:#f0f0f0;
                text-align:center;
                margin:5px;
                padding:3px;
            }
        </style>
    </head>
    <body>
    垂直滚动示例
    <div id="divVScroll" onmouseover="vsp.Pause();" onmouseout="vsp.Continue()">
        <div class="item">AAAAAA</div>
        <div class="item">BBBBBB</div>
        <div class="item">CCCCCC</div>
        <div class="item">DDDDDD</div>
        <div class="item">EEEEEE</div>
        <div class="item">FFFFFF</div>
        <div class="item">GGGGGG</div>
    </div>
        <script language="javascript" type="text/javascript">
            var vsp = new VScrollPanel();
            vsp.height = 100;
            vsp.Bind("divVScroll");
        </script>
    <br /><br />
    水平滚动示例
    <div id="divHScroll" onmouseover="hsp.Pause();" onmouseout="hsp.Continue()">
        <div class="item">AAAAAA</div>
        <div class="item">BBBBBB</div>
        <div class="item">CCCCCC</div>
        <div class="item">DDDDDD</div>
        <div class="item">EEEEEE</div>
        <div class="item">FFFFFF</div>
        <div class="item">GGGGGG</div>
    </div>
        <script language="javascript" type="text/javascript">
            var hsp = new HScrollPanel();
            hsp.width = 400;
            hsp.delay = 10;
            hsp.Bind("divHScroll");
        </script>
    </body>
    </html>
    在class=item中放图片和文字即可,支持左右、上下
      

  6.   

    http://topic.csdn.net/u/20100831/12/b44bfb99-c8dd-42bc-bfd4-ff3743389994.html
    LZ看看这个,也许这个更符合你的要求,滚动已经不那么好了