您应该关心标记输入类和CSS。在JS函数中可以设置所有CASS:
jQuery(document).ready(function ($) {
$(\'#wpx_tags\').suggest(
window.ajaxurl + "?action=wpx_tag_search",
{ multiple:true,
multipleSep: ",",
resultsClass: \'wpx_ac_results\',
selectClass: \'wpx_ac_over\',
matchClass: \'wpx_ac_match\',
}
);
});
因此,这将增加
wpx_ac_results 类添加到结果列表。这个CSS应该解决这个问题:
.wpx_ac_results {padding: 0;margin: 0; list-style: none;position: absolute;z-index: 10000; border: 1px solid #dddddd; box-shadow: 0 1px 2px rgba( 100, 100, 100, 0.8 );background-color: #fff;}
.wpx_ac_results li {margin-bottom: 0; min-width: 200px; padding: 2px 10px; font-size: 14px; white-space: nowrap; text-align: left; cursor: pointer;}
.wpx_ac_results .wpx_ac_over { background-color: #ddd;}
.wpx_ac_results .wpx_ac_over { background-color: #0073aa; color: #fff;}
标记输入如下所示:
<input id="wpx_tags" placeholder="Start typing tag name..." name="wpx_tags" autocomplete="off" value="" type="text">