jquery如何在展开select时删除背景中的滚动条,background:none不起作用

时间:2011-06-09 09:24:58

标签: jquery

$(document).ready(function(){
  $("#keyword_select").mouseover(function(){
    $("#keyword_select").css("height","200px","background-image","none").show(1000);

 });
 });

$(document).ready(function(){
  $("#keyword_select").mouseout(function(){
     $("#keyword_select").css("height","20px").show(1000);
 });
 });

css

#keyword_select {
height:23px;
width:200px;
background-image:url(ddl.jpg);
background-position:right;
background-repeat:no-repeat;

}

和html

<select id=#keyword_select multiple="multiple">
<option> first image </option>
<option> second image</option>
</select>

1 个答案:

答案 0 :(得分:0)

父容器应该有

overflow:hidden;

以下是有关主题W3School Overflow

的更多信息