jQuery用户界面 - 自动完成产生内嵌样式覆盖? [英] jQuery UI - Autocomplete generated inline style override?
本文介绍了jQuery用户界面 - 自动完成产生内嵌样式覆盖?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用时建议现身其中,生成下列标记的jQuery自动完成插件。
<ul class="ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all" role="listbox" aria-activedescendant="ui-active-menuitem" style="z-index: 16; width: 1355px; position: relative; top: -1615px; left: 40px; display: none; ">
<li class="ui-menu-item" role="menuitem">
<a class="ui-corner-all" tabindex="-1">java</a>
</li>
<li class="ui-menu-item" role="menuitem">
<a class="ui-corner-all" tabindex="-1">javascript</a>
</li>
</ul>
我的理解是,它使用 UI位置插件它相对于输入字段定位。但内部产生的风格=的z-index:16;宽度:1355px;位置:亲属;顶部:-1615px;左:40像素;显示:无;
,宽度为比我的输入字段更长的时间。
由于这是由模块添加的内联样式,我不能覆盖这个使用 UI的自动完成
选择。任何想法?
My understanding is, it's using the UI Position plugin to position it relative to the input field. But inside generated style="z-index: 16; width: 1355px; position: relative; top: -1615px; left: 40px; display: none; "
, width is much longer than my input field.
Since this is inline styles added by the module, I can not override this using ui-autocomplete
selector. Any ideas?
推荐答案
使用在CSS重要
方法:。例如
.ui-autocomplete {
width:200px !important;
}
这篇关于jQuery用户界面 - 自动完成产生内嵌样式覆盖?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文