我在css手风琴里面有一个单选按钮,出于某种原因,它不起作用。也许我用于手风琴的CSS重写了单选按钮?也许是因为手风琴是由造成问题的复选框制成的?我也把道场控制手风琴和一些工作,有的没有下面里面的代码:手风琴之外的第一个单选按钮正常工作单选按钮在css手风琴里不起作用
HTML:
<input type="radio" name="colors" value="green" />Green <!--this works fine-->
<input type="radio" name="colors" value="red" />Red
<section id="accordionMTF">
<div>
<div style="width: 450px;
height: 80px"></div>
<input type="checkbox" id="checkMTF-1" checked="checked" />
<label for="checkMTF-1">Input System Info</label>
<article>
<input type="radio" name="colors" value="green" />Green <!--this doesnt work-->
<input type="radio" name="colors" value="red" />Red</article>
</div>
<div>
<input type="checkbox" id="checkMTF-2" />
<label for="checkMTF-3">Input Marking Information</label>
<article>
<p style="width: 450px;
height: 400px">Fill out form</p>
</article>
</div>
<div>
<input type="checkbox" id="checkMTF-3" />
<label for="checkMTF-4">Complete and Submit</label>
<article>
<p style="width: 450px;
height: 400px">Fill out form</p>
</article>
</div>
</section>
CSS: /马克票形式手风琴/
#accordionMTF input {
display: none;
}
#accordionMTF label {
background: #eee;
border-radius: .25em;
cursor: pointer;
display: block;
margin-bottom: .125em;
padding: .25em 1em;
z-index: 20;
}
#accordionMTF label:hover {
background: #ccc;
}
#accordionMTF input:checked + label {
background: #ccc;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
color: white;
margin-bottom: 0;
}
#accordionMTF article {
background: #f7f7f7;
height:0px;
overflow:hidden;
z-index:10;
}
#accordionMTF article p {
padding: 1em;
}
#accordionMTF input:checked article {
}
#accordionMTF input:checked ~ article {
border-bottom-left-radius: .25em;
border-bottom-right-radius: .25em;
height: auto;
margin-bottom: .125em;
}
我有一个小提琴: here
感谢
您radiobox通过CSS隐藏:'#accordionMTF输入{显示:无}'。你还应该使用不同的名称('颜色'已被使用) – fcalderan 2014-11-24 16:03:42
当你说“它不工作”你的意思是说“它不显示”?因为你的CSS显然隐藏了它#accordionMTF input {display:none;}' – 2014-11-24 16:03:59