我有以下 HTML。我想将“查看全部” anchor 标记的位置固定在特定位置。相反, anchor 标记随着下拉列表中值的变化而移动(即根据下拉列表中更改值的长度)。
<div class="row " style="margin-left:75pt;">
<div class="dropdown" style="width:300px;display:inline;">
<label class="text-center" id ="categories" style="margin-top:10pt;font-size:14pt;"> Deals on</label>
<button data-toggle="dropdown" class=" btn dropdown-toggle dropdown-menu-hover-color text-center" style="padding:0px 0px;background-color:white;" href="#"><label style="font-size:14pt; color: #191970;" >{{currentCategory}}</label> <b class="caret"></b></button>
<ul class="dropdown-menu submenu-hover-color dropdown-menu-scroll" style="margin:0;">
<li>
<a href="#" id="{{page.category_id}}" ng-click="changeCategory(page.category_id);" ng-repeat="page in dropdownCategoryList" ng-model="category_id">{{page.category_name}}</a>
</li>
</ul>
</div>
<div style="display:inline;" ng-show="deals"><a href="#" class="view-all-category"> View All</a></div>
<div style="display:inline;" ng-hide="deals"> <label class="text-center" style="margin-top:10pt;font-size:12pt;color: #909090;;">No deals found, please select a different category. </label></div>
</div>
有关如何实现此目标的任何指示。 提前致谢。
最佳答案
尝试使用以下 html:
<div style="display:inline; position: fixed; top: 100px;" ng-show="deals"><a href="#" class="view-all-category"> View All</a></div>
根据您的需要设置“最高”值。我认为它应该对您有所帮助。
关于html - 在特定点修复了 html anchor 标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22649486/