asp.net中手风琴菜单中复选框列表控件的css

asp.net中手风琴菜单中复选框列表控件的css,asp.net,css,accordion,checkboxlist,Asp.net,Css,Accordion,Checkboxlist,我想更改WebForms中可用的复选框列表的默认样式,我可以将更改应用于文本,但无法更改看起来更好、更吸引人的复选框 <div id="left_columnforSale"> <asp:Accordion ID="Accordion1" runat="server" SelectedIndex="0" HeaderCssClass="accordHeader" ContentCssClass="accordContent" HeaderSelectedCssClass

我想更改WebForms中可用的复选框列表的默认样式,我可以将更改应用于文本,但无法更改看起来更好、更吸引人的复选框

<div id="left_columnforSale">   
 <asp:Accordion ID="Accordion1" runat="server" SelectedIndex="0" HeaderCssClass="accordHeader" ContentCssClass="accordContent" HeaderSelectedCssClass="accordHeaderSelected"
           AutoSize="None"
            FadeTransitions="true"
            TransitionDuration="50"
            FramesPerSecond="20"
            RequireOpenedPane="false"
            SuppressHeaderPostbacks="True">
            <Panes>
              <asp:AccordionPane>
               <Header>
                &nbsp;&nbsp;&nbsp;CheckListBox
                </Header>
                 <Content>
                    <asp:CheckBoxList ID="CheckBoxList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="CheckBoxList1_SelectedIndexChanged" CssClass="chkbox">
                    <asp:ListItem Value="0 AND 1000">0 - £1,000</asp:ListItem>
                    <asp:ListItem Value="1000 AND 2000">£1,000 - £2,000</asp:ListItem>
                    <asp:ListItem Value="2000 AND 3000">£2,000 - £3,000</asp:ListItem>
                    <asp:ListItem Value="3000 AND 4000">£3,000 - £4,000</asp:ListItem>
                    <asp:ListItem Value="4000 AND 5000">£4,000 - £5,000</asp:ListItem>
                    <asp:ListItem Value="5000 AND 6000">£5,000 - £6,000</asp:ListItem>
                    <asp:ListItem Value="6000 AND 7000">£6,000 - £7,000</asp:ListItem>
                    <asp:ListItem Value="7000 AND 8000">£7,000 - £8,000</asp:ListItem>
                    <asp:ListItem Value="8000 AND 9000">£8,000 - £9,000</asp:ListItem>
                    <asp:ListItem Value="9000 AND 10000">£9,000 - £10,000</asp:ListItem>

                    </asp:CheckBoxList>

                </Content>

            </asp:AccordionPane>

            </Panes>
 </asp:Accordion>
任何教程a;我会很感激你的帮助
thnx

首先,请注意,复选框远远不够灵活。浏览器不允许您使用CSS为它们设置太多样式。任何纯css解决方案,你不会改变你的复选框的外观那么多。。。对于任何严重的样式更改,都必须使用javascript编写一些类似于复选框的代码

如果您的更改很小/可以在css中完成:

如果要直接在css中设置所有复选框的样式,请使用以下代码:

input[type="checkbox"]{
    /* Here are the styles that will be applied to ALL checkboxes */
}
现在,如果您想为某些复选框指定某些特定内容,可以使用类。通过将CSS类直接应用于复选框。CssClass是ASP.NET中标准web控件的属性,因此您可以将其应用于

<asp:ListItem CssClass="checkbox" Value="0 AND 1000">0 - £1,000</asp:ListItem>
如果您无法使用CSS执行此操作: 下面是几个使用javascript/css可以实现的示例:
http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/

hi,我尝试了您的输入[type=checkbox]{/*以下是将应用于所有复选框的样式*/}input[type=checkbox]{颜色:606060;文本装饰:下划线;光标:指针;}我稍后还会尝试上面的jquery示例,我只是挠头。。在过去的3个小时里,我一直在通过CSSY找出样式化复选框列表。您无法使用输入[type=checkbox]设置文本样式,它实际上是用于设置框的样式。正如我所说的,浏览器不会让你设计那么多的复选框。对于主要更改,请使用js
<asp:ListItem CssClass="checkbox" Value="0 AND 1000">0 - £1,000</asp:ListItem>
.checkbox {
    /* Here are the styles that apply to checkboxes that have the checkbox css class */
}