Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQueryUI自动完成选项-样式问题_Jquery_Css_Jquery Ui - Fatal编程技术网

jQueryUI自动完成选项-样式问题

jQueryUI自动完成选项-样式问题,jquery,css,jquery-ui,Jquery,Css,Jquery Ui,我正在尝试为使用jQueryUI生成的自动完成列表设置样式。一旦做出选择,我可以成功设置输入字段中显示的文本的样式,但无法以相同的方式设置可能值列表的样式。JSFiddle 在输入字段中键入“ap”或“boo”。你会看到“ap”是以某种字体和橙色设计的,这正是我想要的——见下面的屏幕截图。然而,出现的可能值列表是由标准jQueryCSS设计的,我似乎无法关闭它。使用Chrome的开发工具,我认为我需要更改的CSS类是ui自动完成输入,但是更改没有什么区别吗 JS: CSS: 您好,您必须将所需

我正在尝试为使用jQueryUI生成的自动完成列表设置样式。一旦做出选择,我可以成功设置输入字段中显示的文本的样式,但无法以相同的方式设置可能值列表的样式。JSFiddle

在输入字段中键入“ap”或“boo”。你会看到“ap”是以某种字体和橙色设计的,这正是我想要的——见下面的屏幕截图。然而,出现的可能值列表是由标准jQueryCSS设计的,我似乎无法关闭它。使用Chrome的开发工具,我认为我需要更改的CSS类是ui自动完成输入,但是更改没有什么区别吗

JS:

CSS:


您好,您必须将所需的css应用于以下类
.ui菜单项{font-family:'istokweb',sans-serif;字体大小:16px;颜色:#DD4814;}

您必须覆盖/编辑这些类的css“.ui状态焦点”和“.ui菜单项a” 下面是覆盖css

.ui-menu-item a{ font-family:'Istok Web', sans-serif; font-size: 16px; color: #DD4814;}

    .ui-state-focus{
        background:none!important;
        border:none!important;
        font-family:'Istok Web', sans-serif!important;
        font-size: 16px!important;
        color: #DD4814!important;
    }

在现有CSS上编辑,找到类名“.ui state focus”删除背景属性并单独添加其他样式属性。

覆盖/编辑这些类的CSS“.ui state focus”和“.ui”菜单项a”
    .ui-state-default { background:none; border:none; }
    .ui-state-hover { background:none; border:none; }
    .ui-widget input { font-family:'Istok Web', sans-serif; font-size: 16px; color: #DD4814;}
    .go_button { position: relative; top: 12px; }
.ui-menu-item a{ font-family:'Istok Web', sans-serif; font-size: 16px; color: #DD4814;}

    .ui-state-focus{
        background:none!important;
        border:none!important;
        font-family:'Istok Web', sans-serif!important;
        font-size: 16px!important;
        color: #DD4814!important;
    }