如何使下拉列表中的滚动条? [英] how to make scroll bars in dropdown list?

查看:101
本文介绍了如何使下拉列表中的滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我在我的应用程序中使用一个下拉列表.该下拉列表有大约100个条目.我想显示前10个条目,其余条目我想显示一个滚动条.

有谁知道如何做到这一点?

您可以为该任务假设一个简单的html下拉列表.

<select>
<option value="1">One</option>
<option value="2">two</option>
<option value="3">Three</option>
  and so on
    ................
   ................
      .........
</select>



提前谢谢!

Arvind Thakur

解决方案

使用链接:

http://stackoverflow.com/questions/901089/html-select-scroll-bar [ ^ ]

http://qualitypoint.blogspot.com/2009/04/displaying-vertical-scroll- bar.html [^ ]


将您的列表放在DIV标记内,并将DIV样式overflow:auto和DIV的高度设置为固定高度.

哇,谢谢Shameel.它工作正常.


Hi Guys,


I am using a dropdown list in my apps.The dropdown have near about 100 entries.I want to display first 10 entries and for the remaining entries i want to display a scrollbar for that.

Is anyone have any idea that how to accomplish this?

You can assume a simple html dropdown for this task.like..

<select>
<option value="1">One</option>
<option value="2">two</option>
<option value="3">Three</option>
  and so on
    ................
   ................
      .........
</select>



Thanks in advance!

Arvind Thakur

解决方案

use the links :

http://stackoverflow.com/questions/901089/html-select-scroll-bar[^]

http://qualitypoint.blogspot.com/2009/04/displaying-vertical-scroll-bar.html[^]


Put your list inside a DIV tag and set the DIV style overflow:auto and the DIV''s height to a fixed height.


Wow thanks Shameel..its working good.


这篇关于如何使下拉列表中的滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆