input框后添加文字单位
.input-group {
position: relative;
display: table;
border-collapse: separate;
width: 100%;
}
.input-group .form-control, .input-group-addon {
display: table-cell;
}
.input-group-addon {
padding: 5px;
text-align: center;
background-color: #eee;
border-radius: 2px;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.input-group .form-control:first-child{
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
<div class="input-group">
<input name="up_the_peak_gain" type="text" class="layui-input form-control" lay-verify="required">
<span class="input-group-addon">文字</span>
</div>
原文链接:https://blog.csdn.net/wanghu20150107010129/article/details/103529579
浙公网安备 33010602011771号