gpt4 book ai didi

html - header Bootstrap 中的搜索对齐问题

转载 作者:行者123 更新时间:2023-11-28 03:54:39 24 4
gpt4 key购买 nike

我正在使用下面的代码在标题中包含搜索但无法根据长度正确对齐

我希望搜索像下面这样对齐 enter image description here

所以,如果我在标题中添加一个新菜单,那么它应该会自动调整可用空间。

现在,它出现如下 enter image description here

代码链接:https://plnkr.co/edit/GH6Pogkd8LBbETfZRFtm?p=preview 测试

      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#he-nav-bar">
<span class="sr-only">${Toggle navigation}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>


<div sp-navbar-toggle="" class="collapse navbar-collapse navbar-right" id="he-nav-bar">
/**added search here**********/
<form method="get" action="?">
<input type="hidden" name="id" value="search"/>
<input type="hidden" name="t" value="{{data.searchType}}"/>
<div class="input-group input-group-{{::c.options.size}}">
<!-- uses ui.bootstrap.typeahead -->
<input name="q" type="text" placeholder="{{::c.options.title}}" ng-model="c.selectedState"
ng-model-options="{debounce: 250}" autocomplete="off"
uib-typeahead="item as item.label for item in c.getResults($viewValue)"
typeahead-focus-first="false"
typeahead-on-select="c.onSelect($item, $model, $label)"
typeahead-template-url="sp-typeahead.html" class="form-control input-typeahead">
<span class="input-group-btn">
<button name="search" type="submit" class="btn btn-{{::c.options.color}}">
<i ng-if="::c.options.glyph" class="fa fa-{{::c.options.glyph}}"></i>
</button>
</span>
</div>
</form>
<ul ng-if="" class="nav navbar-nav">
<li><a href ng-click="openLogin()">${Login}</a></li>
</ul>
<ul ng-if="" class="nav navbar-nav">
<li ng-if="><a href ng-click="openPopUp()">${Help}</a></li>
<li class="dropdown hidden-xs">
<ul class="dropdown-menu">
<li><a ng-href="">${menu}</a></li>
<li><a href="">${submenu}</a></li>
</ul>
</li>
<li class="visible-xs-block"><a ng-href=""><span class="navbar-avatar"><sn-avatar class="avatar-small-medium" /></span>${name}</a></li>
<li class="visible-xs-block"><a href="">${Logout}</a></li>
</ul>
</div>

</nav>
</div>

谢谢奎师那

最佳答案

I think below code will work for you, 

https://plnkr.co/edit/wPW3AoWvLm37Lz29Pq2Z?p=preview

关于html - header Bootstrap 中的搜索对齐问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43539985/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com