在< select>中隐藏垂直滚动条元件 [英] Hide vertical scrollbar in <select> element

查看:631
本文介绍了在< select>中隐藏垂直滚动条元件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您有我有多个选择的选择框,我需要隐藏垂直滚动条,是否可能?

Hello I have select box with multiple choices and I need to hide the vertical scrollbar, is it possible?

<select name="sCat" multiple="true">
<!-- My Option Here -->
</select>

Okey,但是如何实现一个效果,我可以从列表中选择具有ID和然后使用jQuery来管理这个id.click函数?

Okey, but how then I can achieve an effect where I can select item from list that has ID and then use jQuery to manage this id.click functions? What element I should use then?

推荐答案

这是我们感谢CSS3的所有力量

This is where we appreciate all the power of CSS3

<style>
 .bloc { display:inline-block; vertical-align:top; overflow:hidden; border:solid grey 1px; }
 .bloc select { padding:10px; margin:-5px -20px -5px -5px; }
</style>

<!-- Années -->
<div class="bloc">
  <select name="year" size="5">
    <option value="2010" >2010</option>
    <option value="2011" >2011</option>
    <option value="2012" SELECTED>2012</option>
    <option value="2013" >2013</option>
    <option value="2014" >2014</option>
   </select>
</div>

这篇关于在&lt; select&gt;中隐藏垂直滚动条元件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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