我有一組具有固定的高度和溢出一個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