0

![这是我使用复选框列表的输出][1]

这就是我从我自己的项目中得到的......

但我真的很喜欢这个复选框列表..![这是我真正想要的样本][2]

这是我的输出 [1]: http: //i.stack.imgur.com/nrlMq.png 我想要这个模型[2]:http: //i.stack.imgur.com/N7VNP.png 我应该怎么做我得到这样的复选框列表吗..

    <asp:CheckBoxList ID="CheckBoxList1" 
             RepeatColumns="4"
             RepeatDirection="Horizontal"
             runat="server" 
             style="font-size: large">

这是我的来源,我需要 css 和良好的对齐...请任何人帮助我吗?

4

1 回答 1

0

您可以使用layout如下

 <asp:checkboxlist runat="server" id="chkBoxList1" cssclass="chkBoxList" 
      repeatcolumns="4" repeatlayout="Table">
 </asp:checkboxlist>

用CSS

<style>
  .chkBoxList tr
  {
      height:24px;
  }

  .chkBoxList td
  {
      width:120px; /* or percent value: 25% */
  }
</style>
于 2013-11-11T06:48:17.313 回答