我在列表视图中使用了一个数据采集器。我想,如果用户在第二页,数字第二应该高亮显示。数据采集器代码在这里
.pagination {
font-family: 'signika_negativeRegular', sans-serif;
font-size: 13px;
}
.pagination a,
.pagination strong {
background: #fff;
/* display: inline-block; */
margin-right: 3px;
padding: 4px 12px;
text-decoration: none;
line-height: 1.5em;
/* -webkit-border-radius: 3px; */
-moz-border-radius: 3px;
/* border-radius: 3px; */
border: 1px solid#ccc;
}
.pagination a:hover {
background-color: red;
color: #fff;
}
.pagination a:active {
background: #ccc;
padding: 4px 6px;
}
.pagination strong {
border: 1px solid #ccc;
font-size: 13px;
color: #cf060d;
}HTML:
<div class="pagination">
<asp:DataPager ID="dpNews" runat="server" PagedControlID="lstNews" PageSize="3">
<Fields>
<asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="false" ShowPreviousPageButton="true" ShowNextPageButton="false" />
<asp:NumericPagerField ButtonType="Link" />
<asp:NextPreviousPagerField ButtonType="Link" ShowNextPageButton="true" ShowLastPageButton="false" ShowPreviousPageButton="false" />
</Fields>
</asp:DataPager>
</div>请帮帮忙
发布于 2015-02-17 14:14:00
您可以尝试添加新的css样式,然后可以使用CurrentPageLabelCssClass属性分配css类,如下所示
.pagination
{
font-family: 'signika_negativeRegular' , sans-serif;
font-size: 13px;
}
.pagination a, .pagination strong
{
background: #fff; /* display: inline-block; */
margin-right: 3px;
padding: 4px 12px;
text-decoration: none;
line-height: 1.5em; /* -webkit-border-radius: 3px; */
-moz-border-radius: 3px; /* border-radius: 3px; */
border: 1px solid#ccc;
}
.pagination a:hover
{
background-color: red;
color: #fff;
}
.pagination a:active
{
background: #ccc;
padding: 4px 6px;
}
.pagination strong
{
border: 1px solid #ccc;
font-size: 13px;
color: #cf060d;
}
.current-page
{
background-color: red;
color: #fff;
}HTML:
<div class="pagination">
<asp:DataPager ID="dpNews" runat="server" PagedControlID="ListView1" PageSize="3">
<Fields>
<asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="false" ShowPreviousPageButton="true"
ShowNextPageButton="false" />
<asp:NumericPagerField ButtonType="Link" CurrentPageLabelCssClass="current-page" />
<asp:NextPreviousPagerField ButtonType="Link" ShowNextPageButton="true" ShowLastPageButton="false"
ShowPreviousPageButton="false" />
</Fields>
</asp:DataPager>
</div>希望它有帮助:)
https://stackoverflow.com/questions/28562560
复制相似问题