我遇到了一个问题,我需要将 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/