我嘗試更改單選按鈕列表的圓點(diǎn)圓圈顏色:
<style>
.radioboxlist radioboxlistStyle
{
font-size:x-large;
padding-right: 20px;
}
.radioboxlist label {
}
.radioboxlist label:hover
{
color: darkgreen;
background: white;
}
input:checked + label {
color: darkgreen;
font-size:large;
background: white;
border-color:green;
}
input[type="radio"]:checked + label {
background-color: yellow;
color:yellow;
}
</style>
標(biāo)記
`<asp:RadioButtonList ID="RadioButtonList3" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" BackColor="#E1EFD0" BorderColor="#E1EFD0" BorderStyle="Outset" BorderWidth="2px" CellPadding="2" CellSpacing="5" Font-Size="Small" ForeColor="Black" Height="31px" Width="211px" CssClass="radioboxlist">
<asp:ListItem Selected="True">A</asp:ListItem>
<asp:ListItem>B</asp:ListItem>
<asp:ListItem>C</asp:ListItem>
<asp:ListItem>D</asp:ListItem>
</asp:RadioButtonList>`
我用& quot投入
編輯:懸停顏色設(shè)置 要設(shè)定懸停顏色,請(qǐng)嘗試以下方法:
<style>
.rRed input[type='radio']::after {
width: 15px;
height: 15px;
border-radius: 15px;
top: -2px;
left: -1px;
position: relative;
background-color: red;
content: '';
display: inline-block;
visibility: visible;
border: 2px solid white;
}
.rRed input[type='radio']:checked::after {
width: 15px;
height: 15px;
border-radius: 15px;
top: -2px;
left: -1px;
position: relative;
background-color: blue;
content: '';
display: inline-block;
visibility: visible;
border: 2px solid white;
}
.rRed input[type='radio']:hover::after {
width: 15px;
height: 15px;
border-radius: 15px;
top: -2px;
left: -1px;
position: relative;
background-color: skyblue;
content: '';
display: inline-block;
visibility: visible;
border: 2px solid white;
}
</style>
<asp:RadioButtonList ID="RadioButtonList1" runat="server"
RepeatDirection="Horizontal" CssClass="rRed" >
<asp:ListItem >A</asp:ListItem>
<asp:ListItem>B</asp:ListItem>
<asp:ListItem>C</asp:ListItem>
<asp:ListItem>D</asp:ListItem>
</asp:RadioButtonList>
我們得到這個(gè):