CSS 在 jquery 自动完成中使用 _renderItem 中断
CSS breaking with _renderItem in jquery autocomplete
我在 jquery 自动完成中遇到了 _renderItem 的问题。
我有一个自动完成 fiddle(不使用 _renderItem)- https://jsfiddle.net/fuyfksLd/
This code has a different CSS than usual
我添加了一些 CSS ,当我添加 _renderItem 代码 - https://jsfiddle.net/fjwbLnhv/ 时它会中断。
The background of the list items shrinks.
我做错了什么?
您需要将 <li>
的内容放在 div 而不是锚点中,例如:
<div class="ui-menu-item-wrapper">ActionScript</div>
他们使用不同的样式。
add in css
.ui-autocomplete .ui-menu-item a{
text-decoration: none;
display: block;
width: 100%;
height: 100%;
}
我在 jquery 自动完成中遇到了 _renderItem 的问题。
我有一个自动完成 fiddle(不使用 _renderItem)- https://jsfiddle.net/fuyfksLd/
This code has a different CSS than usual
我添加了一些 CSS ,当我添加 _renderItem 代码 - https://jsfiddle.net/fjwbLnhv/ 时它会中断。
The background of the list items shrinks.
我做错了什么?
您需要将 <li>
的内容放在 div 而不是锚点中,例如:
<div class="ui-menu-item-wrapper">ActionScript</div>
他们使用不同的样式。
add in css
.ui-autocomplete .ui-menu-item a{
text-decoration: none;
display: block;
width: 100%;
height: 100%;
}