jquery - 文本区域顶部对齐与 jQuery 自动完成

标签 jquery css autocomplete textarea vertical-alignment

我遇到了一个问题,我需要将 textarea 与 jQuery .autocomplete 结合使用。我希望自动完成文本显示在 texarea 的顶部,但我似乎无法做到这一点。尽管使用了 css,但文本仍希望在底部对齐:

textarea{ display: inline-block;
          text-align: text-top;
        }

感谢任何见解。

最佳答案

发件人:http://api.jqueryui.com/autocomplete/

Theming

The autocomplete widget uses the jQuery UI CSS framework to style its look and feel. If autocomplete specific styling is needed, the following CSS class names can be used:

ui-autocomplete: The menu used to display matches to the user. ui-autocomplete-input: The input element that the Autocomplete widget was instantiated with.

所以你需要使用jquery UI CSS框架来设置样式。

关于jquery - 文本区域顶部对齐与 jQuery 自动完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25749141/

相关文章:

javascript - 对详细信息标签的摘要部分中的复选框输入有疑问吗?

html - 实现视差后 div 的定位不起作用

php - 从单个数据库中搜索多个文本框

Windows 终端/Powershell 智能感知

javascript - 非依赖保管箱

javascript - 如何给计数器的相应元素赋予类?

javascript - 如何在 CSS 或 Javascript 中定位选定的属性(在 HTML 选项中)

jquery - super 困难的 addClass 延迟函数 w/diff 定时间隔

javascript - 如何让 li 在 JavaScript 中突出显示?

php - Sublime PHP 方法签名和自动完成说明