我有一组具有固定的高度和溢出一个div里面单选按钮:隐藏。有些收音机会隐藏起来,因为它们自然会位于包含div的高度之外。制作溢出:隐藏不滚动
当无线电被选择,并且该无线电是div的可见部分之外,在div获取滚动。
我想要的是能够锁定的div滚动,无论当前检查无线电可见或不可见。我不想让div滚动。
说明重现:
在FF/IE:
- 点击单选按钮
- 使用向上/向下箭头
下面是代码:http://www.jsfiddle.net/kANKu/1/
<div style="width:200px; height:100px; border: solid 1px red; margin:0 auto;overflow:hidden;">
<input type="radio" name="rad1" value="hello" id="hello1" /><label for="hello1">hello1</label> <br />
<input type="radio" name="rad1" value="hello" id="hello2" /><label for="hello2">hello2</label> <br />
<input type="radio" name="rad1" value="hello" id="hello3" /><label for="hello3">hello3</label> <br />
<input type="radio" name="rad1" value="hello" id="hello4" /><label for="hello4">hello4</label> <br />
<input type="radio" name="rad1" value="hello" id="hello5" /><label for="hello5">hello5</label> <br />
<input type="radio" name="rad1" value="hello" id="hello6" /><label for="hello6">hello6</label> <br />
<input type="radio" name="rad1" value="hello" id="hello7" /><label for="hello7">hello7</label> <br />
<input type="radio" name="rad1" value="hello" id="hello8" /><label for="hello8">hello8</label> <br />
<input type="radio" name="rad1" value="hello" id="hello9" /><label for="hello9">hello9</label> <br />
</div>
我没有看到滚动,我只看到了前5个单选按钮,而我只能选择其中5 – netadictos 2010-10-20 16:23:41
你点击一个电台和使用向上/向下箭头将选择更改为另一个收音机? – DanC 2010-10-20 17:27:42
是你提供的答案你在找什么? – 2010-10-21 08:36:18