答案 0 :(得分:1)
您只需要覆盖元素继承的样式。
隐藏可见性可确保原始布局完好无损,只是元素不会被隐藏。
这就是你能做的。
/* override Styles here. */
.custom .input-group-addon + input {
display: none;
}
.custom .dropdown-menu-right{
right:auto;
}

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="input-group custom"> <span class="input-group-addon">Language</span>
<input class="form-control" type="text" placeholder="I want to hide this input text make it type=hidden">
<div class="input-group-btn open">
<button type="button" class="btn btn-default dropdown-toggle">English (en-US) <span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<div class="input-group input-group-sm" style="margin: 0 auto;">
<input class="form-control" aria-describedby="basic-addon1">
</div>
</li>
<li class="divider"></li>
<li><a href="#">French (fr)</a>
</li>
<li><a href="#">Spanish (es-ES)</a>
</li>
</ul>
</div>
</div>
&#13;