这可能是一个简单的修复,我已经搜索了一个答案,但没有找到答案。当只有几页存在时,我的分页栏会跳到顶部:
如果只有几页,我如何防止它跳到右上角?
部分视图:
div class="container">
<div class="col-md-8">
<div class="posts">
<div class="row">
<div class="content">
<h2>Archive from @DateAndTime.MonthName(ViewContext.RouteData.Values("Month")) @ViewContext.RouteData.Values("Year")</h2>
@For Each item In Model.ToList
@<div class="col-lg-6 col-md-6">
<div class="panel panel-default panel-body">
@item.PostDateCreated.Value.ToShortDateString @item.PostDateCreated.Value.AddHours(3).ToShortTimeString
<div class="galleryImgWrapper">
<a href="@Url.Action("Details", "Posts", New With {.id = item.Id, .title = (item.PostTitle).ToSeoUrl}, Nothing)">
@Html.Raw(item.PostSummary.GetImage)
</a>
</div>
<h4>@Html.ActionLink(item.PostTitle, "Details", "Posts", New With {.id = item.Id, .title = item.PostTitle.ToSeoUrl}, Nothing)</h4>
@Html.Raw(item.PostSummary.RemoveImgWithRegex)
</div>
</div>
Next
</div>
</div>
</div>
</div>
@Html.BootstrapPager(ViewContext.RouteData.Values("Page"),
Function(index) Url.Action("Archives", "Posts", New With {.page = index}),
ViewBag.count, System.Web.Configuration.WebConfigurationManager.
AppSettings("PageSize"), 20)
</div>
答案 0 :(得分:0)
解决了它 - 为分页栏增加了一个非常宽的宽度,使其全部保持在线并从跳到顶部。
.superwide {
width:100000px;
}