我有多个asp:checkbox和一个asp:RadioButtonList。我的问题是,它们的字体默认为粗体。我该如何更改? 已尝试正常更改bootstrap.css标签的字体粗细,但未进行任何更改。
<asp:RadioButtonList runat="server" ID="rbtType">
<asp:ListItem Selected="True" Value="0">Project Charging</asp:ListItem>
<asp:ListItem Value="1">Movement</asp:ListItem>
<asp:ListItem Value="2">Nonproductive Time</asp:ListItem>
<asp:ListItem Value="3">Overtime</asp:ListItem>
</asp:RadioButtonList>
css:
.label {
display: inline;
padding: .2em .6em .3em;
font-size: 75%;
font-weight: normal;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25em;
}
页面源:
<div class="col-md-2">
<table id="MainContent_rbtType" style="font-weight: 400">
<tr>
<td><input id="MainContent_rbtType_0" type="radio" name="ctl00$MainContent$rbtType" value="0" checked="checked" /><label for="MainContent_rbtType_0">Project Charging</label></td>
</tr><tr>
<td><input id="MainContent_rbtType_1" type="radio" name="ctl00$MainContent$rbtType" value="1" /><label for="MainContent_rbtType_1">Movement</label></td>
</tr><tr>
<td><input id="MainContent_rbtType_2" type="radio" name="ctl00$MainContent$rbtType" value="2" /><label for="MainContent_rbtType_2">Nonproductive Time</label></td>
</tr><tr>
<td><input id="MainContent_rbtType_3" type="radio" name="ctl00$MainContent$rbtType" value="3" /><label for="MainContent_rbtType_3">Overtime</label></td>
</tr>
</table>
我的解决方案:
.rbtType label {
font-weight: normal;
}
asp:RadioButtonList runat="server" CssClass="rbtType" ID="rbtType">
<asp:ListItem Selected="True" Value="0">Project Charging</asp:ListItem>
<asp:ListItem Value="1">Movement</asp:ListItem>
<asp:ListItem Value="2">Nonproductive Time</asp:ListItem>
<asp:ListItem Value="3">Overtime</asp:ListItem>
</asp:RadioButtonList>