我刚刚从 bootstrap 2.3.2 升级。
我已经从文档中复制/粘贴了示例,但附加组件对其中的字符没有影响。
我正在尝试的代码:
<div class="input-group">
<span class="input-group-addon">@</span>
<input type="text" class="form-control" placeholder="Username">
</div>
@ 看起来就像一个普通的 at,没有任何背景或任何东西。
我做错了什么?
最佳答案
我没有发现您的代码有问题,请参阅:http://bootply.com/69981 你从 2.3.2 迁移到 3 RC1?我认为你包含了错误的 CSS。在主站点 ( http://twitter.github.io/bootstrap/ ) 上,您现在可以找到 Bootstrap 3 的文档。 Twitter 的 Bootstrap 2.3.2 文档移至 http://twitter.github.io/bootstrap/2.3.2/ .
您现在无法下载版本 3 的已编译 CSS。但是您可以从 Github (https://github.com/twbs/bootstrap/tree/3.0.0-wip) 下载代码并使用 Grunt 进行编译。或者使用CDN:http://blog.netdna.com/opensource/bootstrapcdn/bootstrapcdn-now-serving-3-0-0-rc1/ 罢工>
Bootstrap 3 将于 2013 年 8 月 19 日发布,请参阅:http://blog.getbootstrap.com/2013/07/18/ante-up/ 罢工>
Twitter Bootstrap 2.3.2:
<div class="input-prepend">
<span class="add-on">@</span>
<input class="span2" id="prependedInput" type="text" placeholder="Username">
</div>
Bootstrap 3.0.0 (RC1):
<div class="input-group">
<span class="input-group-addon">@</span>
<input type="text" class="form-control" placeholder="Username">
</div>
关于html - Bootstrap 输入组插件不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17903199/