gpt4 book ai didi

css - twitter bootstrap typeahead 根据查询更改下拉菜单宽度

转载 作者:行者123 更新时间:2023-11-28 18:14:51 24 4
gpt4 key购买 nike

我不确定这是否与 jQuery 相关,但我非常怀疑。这张图片详细说明了我的问题:

problem picture using typeahead, field in autocomplete too long for width

查询结果比宽度长并且不缩放/调整大小。我尝试用

更改 bootstrap-typeahead.js
  _resizeMenu : function() {
var ul = this.$menu;
ul.css("min-width", this.$element.outerWidth());
}

但是不行...我想保持搜索框的大小,但我不想更改字体,因为它会使其他所有内容都太小。我希望下拉框根据查询的大小进行扩展。顺便说一句,我正在使用 Twitter Bootstrap 2.3.2。有没有其他人解决过这个问题?

最佳答案

啊,我发现错误了。这在 bootstrap.css 中似乎并不一致

 .pull-right > .dropdown-menu {
//right: 0;
left: auto;
}

必须删除 right: 0。这当然只有在您像我一样使用向右拉导航栏搜索时才有效。

关于css - twitter bootstrap typeahead 根据查询更改下拉菜单宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18027701/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com