0
select2-3.5.2は問題なく動作していました。しかし、4.0.3にアップグレードするとすぐに、ページの左側に突然表示されます。私はjquery-UIを使用しています。select2 alignment not working
float:right;私はJSでこれを行うよう
<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>
select2-4.0.3に何ら影響を与えていない:
$("#themes").select2({dropdownAutoWidth:true,placeholder:'Change theme'});
CSS:
.infobar {
height:27px;
font-weight:bold;
overflow:hidden;
border:0px;
}
https://jsfiddle.net/Twisty/Lq7q5xxj/はあなたに感謝します。私は.select2コンテナのようなものがあるのを知らなかった... – rajeev