更改单选按钮被选中后的按钮颜色
保证金比例: <asp:RadioButtonList RepeatDirection="Horizontal" ID="RadioButtonList1" runat="server" RepeatLayout="Flow"> <asp:ListItem Text="20%" Value="0.2" Selected="True"></asp:ListItem> <asp:ListItem Text="30%" Value="0.3"></asp:ListItem> <asp:ListItem Text="40%" Value="0.4"></asp:ListItem> <asp:ListItem Text="50%" Value="0.5"></asp:ListItem> </asp:RadioButtonList>(保证金200)
颜色未能改变
实现效果图:
单选按钮选中后变成橘黄色,默认颜色是这样的:
在单选按钮组控件中 添加属性 RepeatLayout ,
值选“flow”<asp:RadioButtonList ID="rblcellstat" runat="server" Width="240px" RepeatDirection="Horizontal" RepeatLayout="flow">
(说明:选“flow”,RadioButtonList控件在网页中显示为<span></span>形式,若选“table”,在网页中显示<table>
下面写一个css