日期:2014-05-17  浏览次数:20345 次

ASP.NET]DataPager的样式如何控制呢?
奇怪,刚才发的一贴找不到页面,再发
HTML code


<asp:DataPager ID="Pager" class='pager' runat="server" PageSize="5" PagedControlID="ListView1">

<Fields>

 <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="True" ShowNextPageButton="False" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PreviousPageText="上一页" />

<asp:NumericPagerField CurrentPageLabelCssClass="current" ButtonCount="10" />

<asp:NextPreviousPagerField ButtonType="Link" ShowLastPageButton="True" ShowPreviousPageButton="False" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PreviousPageText="上一页" />

</Fields>

</asp:DataPager>




HTML code

    <style type="text/css">
        .pager
        {
            display: block;
            padding: 5px 0;
            margin: 10px 0 10px 0;
        }
        .pager a, .pager span
        {
            border: 1px solid #E6E7E1;
            line-height: 20px;
            margin-right: 5px;
            padding: 0 6px;
            color: #0046D5;
        }
        .pager a:hover
        {
            text-decoration: none;
            border-color: #0046D5;
        }
        .pager .current
        {
            background-color: #0046D5;
            border-color: #0046D5;
            color: #fff;
            font-weight: bold;
        }
        .pager .total, .pager .total strong
        {
            color: Gray;
            padding: 0 3px;
        }
    </style>





首页、上一页、下一页、尾页的样式要如何控制?谢谢

------解决方案--------------------
设置上一页下一页最后一页用下面的样式来设置

.pager input { }
------解决方案--------------------

网上有很多现成的别人已经搭配好了的样式,你去搜搜,改改就行了

这个分页用的人应当不多。