我有以下.aspx
页面
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test Control</title>
<style type="text/css">
input[type="radio"][checked] +label
{
font-weight: bold;
color: Green;
}
input[type="radio"][disabled] +label
{
font-weight: bold;
color: Green;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="radio" name="abc" value="val1" disabled="disabled"/>val1<br/>
<input type="radio" name="abc" value="val2"/>val2
<input type="radio" name="abc" value="val3"/>val3
</div>
</form>
</body>
</html>
我在这里做错什么了吗?因为我在标签中定义的 css 样式没有在页面上隐含。这是 上述示例的JSFiddle
根据代码,禁用的按钮应该是绿色的,但它不是..对于选中的按钮类似