Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 3 所选的.js样式不符合Bootstrap3样式_Twitter Bootstrap 3_Jquery Chosen - Fatal编程技术网

Twitter bootstrap 3 所选的.js样式不符合Bootstrap3样式

Twitter bootstrap 3 所选的.js样式不符合Bootstrap3样式,twitter-bootstrap-3,jquery-chosen,Twitter Bootstrap 3,Jquery Chosen,我使用selected.jsv1.0,并在我的bootstrap3项目中使用它,但我的选择框的样式根本不符合bootstrap3的样式 我做错什么了吗?我只是使用调用了选择框 $('#选择输入')。已选择()对吗 selected.js(selected.css)和引导css都会将css样式添加到输入(selects)中。尝试在bootstrap.css之后加载select.css: <link rel="stylesheet" href="bootstrap3/bootstrap-3

我使用selected.jsv1.0,并在我的bootstrap3项目中使用它,但我的选择框的样式根本不符合bootstrap3的样式

我做错什么了吗?我只是使用
调用了选择框
$('#选择输入')。已选择()对吗

selected.js(selected.css)和引导css都会将css样式添加到输入(selects)中。尝试在bootstrap.css之后加载select.css:

  <link rel="stylesheet" href="bootstrap3/bootstrap-3.0.0-wip/dist/css/bootstrap.css">
  <link rel="stylesheet" href="docsupport/style.css">
  <link rel="stylesheet" href="docsupport/prism.css">
  <link rel="stylesheet" href="chosen.css">
  <style type="text/css" media="all">
    /* fix rtl for demo */
    .chosen-rtl .chosen-drop { left: -9000px; }
  </style>

NB默认情况下,selected.js绑定了一个旧版本的jQuery。Twitter Bootstrap(javascript)需要最新版本(实际上,有人为所选内容创建了bootstrap3.0css主题

一些屏幕:

该主题可在下面使用。
编辑

我使用与官方选择的文档页面相同的HTML创建了该页面,并应用了引导主题。(将
表单控件添加到所有选择中,并删除
style=“width:350px;”

此外,我将在本要点中保持主题:

所选1.0的备用样式表。此样式表应能更好地与Bootstrap3.0集成

这里有


这里还有另一个主题支持Bootstrap 3

看起来像是本地的bs输入


如果要更改选择框的大小以响应需要,可以使用:

[class*="col-"] .chosen-container {
    width:98%!important;
}
[class*="col-"] .chosen-container .chosen-search input[type="text"] {
    padding:2px 4%!important;
    width:90%!important;
    margin:5px 2%;
}
[class*="col-"] .chosen-container .chosen-drop {
    width: 100%!important;
}

来源:

我已验证所选的.min.css文件在bootsrap.css之后加载,并已按照规定应用了样式。似乎仍然无法解决问题。我在页面上使用jQuery 1.10.2。您能展示一个显示问题的代码示例吗?(我已使用所选的.js附带的index.html对上述内容进行了测试)这对我来说是一种享受——也和鲍尔玩得很好。
[class*="col-"] .chosen-container {
    width:98%!important;
}
[class*="col-"] .chosen-container .chosen-search input[type="text"] {
    padding:2px 4%!important;
    width:90%!important;
    margin:5px 2%;
}
[class*="col-"] .chosen-container .chosen-drop {
    width: 100%!important;
}