我选择使用此代码构建每周NFL选秀的应用程序。任何人都可以协助我隐藏通用单选按钮吗?我想收集每个人的所有选秀权。
HTML
<div class="buttons" runat="server">
<input type="radio" name="gp1" id="gpBAL" value="working" />
<label for="gpBAL" class="working"><span>BAL</span></label>
<input type="radio" name="gp1" id="gpNC" value="not checked" checked/>
<label for="gpNC" class="not_checked"><span> ||</span></label>
<input type="radio" name="gp1" id="gpWAS" value="faulty" />
<label for="gpWAS" class="faulty"><span>WAS</span></label>
</div>
CSS
body{font-family: helvetica;}
input[type="radio"]{ -webkit-appearance:none;}
input[type="radio"]+label
{
background: url('../images/switch.png') repeat-x;
float: left;
display:Block;
}
input[type="radio"] + label span
{
display: block;
background: url('../images/switch.png') no-repeat;
display: block;
line-height: 30px;
}
input[type="radio"]+label.working span
{
background-position: left -90px; padding: 0 10px;
}
input[type="radio"]+label.not_checked span
{
padding: 0 10px;
}
input[type="radio"]+label.faulty span
{
background-position: right -180px; padding: 0 10px;
}
input[type="radio"]:checked+label
{
background-position: left -60px;
}
input[type="radio"]:checked+label.working span
{
background-position: left -150px;
color: white;
}
input[type="radio"]:checked+label.faulty span
{
background-position: right -240px;
color: white;
}
input[type="radio"]:checked+label.not_checked
{
background-position: left -30px;
color: white;
}
答案 0 :(得分:1)
input[type="radio"] {display: none;}
隐藏单选按钮。