twitter-bootstrap Bootstrap 输入组插件不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17903199/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bootstrap input-group-addon does not work
提问by imperium2335
I have just upgraded from bootstrap 2.3.2.
I have copy / pasted the example from the documentation but the add-on doesn't have effect on the character within.
我刚刚从 bootstrap 2.3.2 升级。
我已经复制/粘贴了文档中的示例,但附加组件对其中的字符没有影响。
The code I am trying:
我正在尝试的代码:
<div class="input-group">
<span class="input-group-addon">@</span>
<input type="text" class="form-control" placeholder="Username">
</div>
The @ just looks like a normal at with no background or anything.
@ 看起来像一个没有背景或任何东西的普通 at。
What am I doing wrong?
我究竟做错了什么?
回答by Bass Jobsen
I don't find a problem with your code see: http://bootply.com/69981You migrate from 2.3.2 to 3 RC1? I think you include the wrong css. On the main site (http://twitter.github.io/bootstrap/) you will find the docs for Bootstrap 3 now. The docs for Twitter's Bootstrap 2.3.2 are move to http://twitter.github.io/bootstrap/2.3.2/.
我没有发现您的代码有问题,请参阅: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/。
You can't download the compiled CSS for version 3 now. But you can download the code from Github (https://github.com/twbs/bootstrap/tree/3.0.0-wip) and compile it with Grunt. Or use CDN: http://blog.netdna.com/opensource/bootstrapcdn/bootstrapcdn-now-serving-3-0-0-rc1/
您现在无法下载版本 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 will be released on 19 aug 2013, see: http://blog.getbootstrap.com/2013/07/18/ante-up/
Bootstrap 3 将于 2013 年 8 月 19 日发布,参见:http: //blog.getbootstrap.com/2013/07/18/ante-up/
Twitters Bootstrap 2.3.2:
Twitter 引导程序 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):
引导程序 3.0.0 (RC1):
<div class="input-group">
<span class="input-group-addon">@</span>
<input type="text" class="form-control" placeholder="Username">
</div>

