Kendo Autocomplete如何禁用默认的CSS样式

red*_*rom 5 css jquery twitter-bootstrap kendo-ui

我已经使用Twitter Bootstrap设置了表单输入的样式。

我需要添加Kendo自动完成输入,但是问题是每个初始化的自动完成输入都会覆盖我的CSS样式(请参见下图)。左输入使用Kendo Autocomplete设置样式,右输入使用Bootstrap设置样式。

是否有可能禁用表单中输入的Kendo输入样式?

在此处输入图片说明

谢谢你的帮助。

小智 2

我也遇到这个问题,找到下面的解决方案。

<style type="text/css">
/*The below is to remove the css for the autocomplete control - Job Title */
        .autocomplete {
            display: inline-block !important;
            border: 0 !important;
            background: none !important;
            box-shadow: none !important;
        }
</style>
Run Code Online (Sandbox Code Playgroud)

您的控件初始化

$("#title").kendoAutoComplete({
                    dataSource: data.Sample,
                    dataTextField: "title_Cd",
                    filter: "startswith"
                }) .parent()
                    .addClass('autocomplete');
Run Code Online (Sandbox Code Playgroud)

就是这样..

谢谢开发