【发布时间】:2016-07-30 23:29:27
【问题描述】:
select2-3.5.2 工作正常。但是一旦我升级到 4.0.3,它就会突然出现在页面的左侧。我正在使用jquery-UI,希望这两个能很好地配合使用。
浮动:右;对select2-4.0.3没有影响
<div style="position:absolute; top:0px; left:0px; width:100%" class="ui-widget infobar-wrapper">
<div name="ibar1" id="ibar1" class="ui-widget-header infobar">
<select name="themes" id="themes" style="float:right;"> <!--margin-top:-3px;-->
<option></option>
<option value="black-tie">black-tie</option>
<option value="trontastic">trontastic</option>
<option value="ui-darkness">ui-darkness</option>
<option value="ui-lightness">ui-lightness</option>
</select>
</div>
</div>
我在 JS 中这样做:
$("#themes").select2({dropdownAutoWidth:true,placeholder:'Change theme'});
css:
.infobar {
height:27px;
font-weight:bold;
overflow:hidden;
border:0px;
}
【问题讨论】:
标签: javascript jquery jquery-ui select2