0
我有以下形式和正在使用的CSS显示显示跨度使用的代码显示glyphicon立即当单选按钮被选中
<style>
.glyphicon{
display: none;
}
input[type="radio"]:checked + span{
display: block;
}
</style>
<form>
<div class="form-group" id="myform">
<label for="usr">Q1:Are these dates in chronological order?1492,1941,1586 </label>
</div>
<div class="radio">
<label><input type="radio" id="opt0" name="optradio0">yes<span id="sp0" class="glyphicon glyphicon-remove"></span></label>
</div>
<div class="radio">
<label><input type="radio" id="opt1" name="optradio0">no<span id="sp1" class="glyphicon glyphicon-ok"></span></label>
</div>
<br/>
</form>
被点击单选按钮时然而,有一个问题,即glyphicons是当页面加载时可见。见下面
http://upscfever.com/upsc-fever/en/apti/en-apti1-chp6a.html
链接然而,当我删除的页面下面给出的代码工作正常。那么我怎么能保持下面的代码,并仍然达到目的。
<script>
$(document).ready(function(){
$("#header").load("http://upscfever.com/upsc-fever/header.html");
$("#footer").load("http://upscfever.com/upsc-fever/footer.html");
});
</script>
没有标识符到glyphicons –
'glyphicon-ok'这是一个标识符。标识符可以是一个类或一个id。 –
。glyphicon-ok { display:none; } 。glyphicon-remove { display:none; } –