Select2 start with input field instead of dropdown

前端 未结 11 896
太阳男子
太阳男子 2020-12-08 06:44

I use the js library select2. This is a screenshot of what I have now:
Start:
\"enter

11条回答
  •  眼角桃花
    2020-12-08 07:39

    I simply formatted a standard input box with CSS to look like a Select2() dropdown:

    input {
        width: 100%;
        padding: 7px 5px;
        margin: 1px 0;
        display: inline-block;
        border: 1px solid #ccc;
        border-radius: 4px;
        box-sizing: border-box;
    }
    

提交回复
热议问题