首页 > 开发 > 综合 > 正文

DataGrid的走马灯效果

2024-07-21 02:22:40
字体:
来源:转载
供稿:网友

'>' forecolor="#ff7f66" font-italic="true">把 datadrid放到marquee 里,注意,如果要放到一个td里时,td的长度要设置的

  <<marquee onmouseover="this.stop()" onmouseout="this.start()" scrollamount="3" scrolldelay="0"   direction="up" height="98">>
              <asp:datagrid id="dgnews" runat="server" width="400" autogeneratecolumns="false" borderwidth="0" height="100" showheader="false">
               <columns>
                <asp:templatecolumn headertext="新闻内容">
                 <headerstyle width="70%"></headerstyle>
                 <itemstyle width="70%"></itemstyle>
                 <itemtemplate>
                  
                  <asp:label id="label10" text='<%#databinder.eval(container.dataitem,"xxsm")%>' runat=server/>
                  (
                  <asp:label id="label5" font-italic=true text='<%#databinder.eval(container.dataitem,"xgrq")%>' forecolor=#ff7f66 runat=server/>
                  )
                  <asp:image id="newpic" runat="server" imageurl="images/main/new.gif" width="28" height="11"></asp:image>
                 </itemtemplate>
                </asp:templatecolumn>
               </columns>
              </asp:datagrid>
             <</marquee>>

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表