A nice css style for ajax autoComplete Extender

…衆ロ難τιáo~ 提交于 2019-12-10 11:45:44

问题


I would really like to stay with my current implementation of auto-complete done via ajax toolkit, as it was relatively easy to implement it via C#.

I could see the jQuery autocomplete has a lot of styling themes, like in links below (rounded corners, well designed style, etc.)

  • Link1
  • Link2

How could I set a CssStyle like that on an AjaxToolKit AutoComplete Extender ?

If there is someone that knows how to simply do it, or has a nice style ready to be used or even a link, I will really appreciate it.


回答1:


trying the first link from search you get this great tutorial on how to style

AjaxToolKit AutoComplete Extender

http://vijaysinghnegi.blogspot.com/2012/04/best-css-style-for-autocomplete.html

the reason why jquery make look so stylish is because they provide a default style to it

but whit AjaxToolKit AutoComplete Extender you got to play with CSS to make it look the way you want

<style type="text/css">
    /*AutoComplete flyout */
    .completionList {
        border: solid 1px #444444;
        margin: 0px;
        padding: 2px;
        height: 100px;
        overflow: auto;
        background-color: #FFFFFF;
    }

    .listItem {
        color: #1C1C1C;
    }

    .itemHighlighted {
        background-color: #ffc0c0;
    }
</style>

 CompletionListCssClass="completionList"
 CompletionListHighlightedItemCssClass="itemHighlighted"
 CompletionListItemCssClass="listItem"



回答2:


I've created a Meteor autocomplete extender, which allows both free text and multiple autocomplete sources. Meteor's data model allows for fast multi-rule searching with custom rendered lists.

I used the CSS style from jquery-sew. See their demo here or the CSS here.



来源:https://stackoverflow.com/questions/14076947/a-nice-css-style-for-ajax-autocomplete-extender

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!