我一直在使用这段代码,适用于Bootstrap 4 beta,一切都很好。
<label for="username" th:text="#{login.user">User</label>
<div class="input-group">
<span class="input-group-addon"><i class="icon-user"></i></span> <input
type="text" id="username" name="username" class="form-control"
placeholder="Usuario" th:placeholder="#{login.user}"
th:required="true" />
</div>
现在,我已将Bootstrap 4更新到最新的v4.0.0版本,但是代码不起作用。 Bootstrap css文件中不存在input-group-addon
类。
如果我将这个添加到我的css样式文件中,一切都可以正常工作:
.input-group-addon {
padding: .375rem .75rem;
margin-bottom: 0;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #495057;
text-align: center;
background-color: #e9ecef;
border: 1px solid #ced4da;
}
我做错什么了吗?谢谢。