DIV浮动
<asp:Repeater ID="Repeater1" runat="server"> <ItemTemplate> <div style="width:233px;height:20px;float:left;overflow:hidden;margin-left:5px;"> <div style="float:left;background-color:#E52300;height:10px;width:10px;font-size:8px;color:#ffffff;margin-top:2px;"><%#Container.ItemIndex+1 %></div> <div style="float:left;font-size:12px;height:20px;" class="ss"> <a href='<%#GetInfoViewLink((int)Eval("id")) %>' target="_blank" class="ss"><%# GetFixTitle(Eval("title").ToString(),20)%></a> </div> </div> </ItemTemplate> </asp:Repeater> 让其可以绑定后横着显示 1 2 3 4 5 6 只为记忆代码 来源: https://www.cnblogs.com/epwqgdnvrhok