【发布时间】:2016-04-12 19:45:17
【问题描述】:
我正在尝试在 inout 类型旁边插入一个图标,使用此代码能够做到这一点
<div class="form-group">
<label for="accountSpan">Account name</label>
<div class="input-group input-group-unstyled">
<span class="input-group-addon" id="accountSpan">something</span>
<input type="text" class="form-control" placeholder="account name" aria-describedby="basic-addon1" id="accountInput">
<span class="input-group-addon">
<i class="glyphicon glyphicon-question-sign"></i>
</span>
</div>
</div>
还有这个css
.input-group.input-group-unstyled input.form-control {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.input-group-unstyled .input-group-addon {
border-radius: 4px;
border: 0px;
background-color: transparent;
}
我在这个帖子Put search icon near textbox using bootstrap中找到的
但是给定的 css 改变了插件的格式,导致
我错过了什么?谢谢
更新
去除背景色:透明;将导致插件有一个边框
【问题讨论】:
-
尝试删除这个:
background-color: transparent;和border: 0px; -
您能否具体说明您期望的样式。代码在没有这种样式的情况下也可以工作,只需加载 Bootstrap.
-
感谢您的评论@C0dekid.php,请参阅我的更新。
-
@LionelT 感谢您的回复,我更新了我的 OP :)
-
你想说什么,你想要带有图标的插件?没有颜色或插件?
标签: css twitter-bootstrap