<asp:Repeater ID="Re_PsHouse_Chuzu" runat="server">
                            <HeaderTemplate>
                                <table>
                                    <tr>
                                        <td style="text-align: center">
                                            小区 价格 发布时间 有效天数
                                        </td>
                                    </tr>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td style="text-align: center; width: 400px;">
                                        <marquee direction="up" width="400px" height="20px" scrollamount="1" behavior="scroll"
                                            onmouseover="this.stop()" onmouseout="this.start()">
                                            <asp:HyperLink ID="HyperLink1" ForeColor="blue" runat="server" Text='<%#Eval("AreaName","{0}"+Eval("Chuzu_Address")) %>' NavigateUrl="~/MainForm.aspx"></asp:HyperLink>
                                            <%#Eval("Chuzu_Money") %>                                  
                                            <%#Eval("Chuzu_Time") %>
                                            <%#Eval("Chuzu_Day") %>
                                         </marquee>
                                    </td>
                                </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                                </table></FooterTemplate>
                        </asp:Repeater>
我是用repeater绑定的
然后用marquee让它滚动
可是滚动都是一条一条滚动
怎么让它把显示的全部数据一起向上滚动

解决方案 »

  1.   

    <ItemTemplate>里marquee标签不要,其他改成如下<HeaderTemplate>
        <table>
            <tr>
                <td style="text-align: center">
                    小区 价格 发布时间 有效天数
                </td>
            </tr>
        </table>
        <marquee direction="up" width="400px" height="20px" scrollamount="1" behavior="scroll"onmouseover="this.stop()" onmouseout="this.start()">
        <table>
    </HeaderTemplate><FooterTemplate>
        </table>
        </marquee>
    </FooterTemplate> 
      

  2.   

    <marquee direction="up" width="400px" height="20px" scrollamount="1" behavior="scroll"onmouseover="this.stop()" onmouseout="this.start()">
        <table>
    </HeaderTemplate><FooterTemplate>
        </table>
        </marquee>
    </FooterTemplate> 
      

  3.   

    ItemTemplate本身即为循环项模板,你的代码会循环出很多ItemTemplate,把marquee标签放到其他项模板里或干脆直接放到Repeater控件外面都行。