我是html,javascript,bootstrap,selectize的新手. glyphicon的高度未正确呈现.
我哪里错了,请帮忙.
我哪里错了,请帮忙.
<!DOCTYPE html> <html lang="en"> <head> <Meta charset="utf-8"> <Meta http-equiv="X-UA-Compatible" content="IE=edge"> <Meta name="viewport" content="width=device-width,initial-scale=1"> <title>My Shop!</title> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" type="text/css"> <link href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.4/css/selectize.bootstrap3.css" rel="stylesheet" type="text/css"> <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.4/js/standalone/selectize.js"></script> </head> <body> <div class="input-group"> <span class="input-group-addon"> <i class="glyphicon glyphicon-plus"></i> </span> <select class="form-control" id="txnParty"> <option>one</option> <option>two</option> </select> </div> <script> $('select').selectize(); </script> </body> </html>
解决方法
试试这种方式:
$('#select').selectize({ inputClass: 'form-control selectize-input',dropdownParent: "body" });
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。