How do I clear a search box with an 'x' in bootstrap 3?

前端 未结 9 1554
情歌与酒
情歌与酒 2020-12-12 10:44

Having some trouble with bootstrap, so some help would be awesome. Thanks

What I would like:(top part)

\

9条回答
  •  情书的邮戳
    2020-12-12 11:28

    I tried to avoid too much custom CSS and after reading some other examples I merged the ideas there and got this solution:

    As I don't use bootstrap's JavaScript, just the CSS together with Angular, I don't need the classes has-clear and form-control-clear, and I implemented the clear function in my AngularJS controller. With bootstrap's JavaScript this might be possible without own JavaScript.

提交回复
热议问题