• GridView CSS的样式表


    2008-08-19 16:36

    在<head></head>标签中加入一个样式表,并定义它.

    <style type="text/css">
                        .GridViewStyle
                   {  
                        border-right: 2px solid #A7A6AA;
                        border-bottom: 2px solid #A7A6AA;
                        border-left: 2px solid white;
                        border-top: 2px solid white;
                        padding: 4px;
                    }

                    .GridViewStyle a
                    {
                        color: #FFFFFF;
                    }

                    .GridViewHeaderStyle th
                    {
                        border-left: 1px solid #EBE9ED;
                        border-right: 1px solid #EBE9ED;
                    }

                    .GridViewHeaderStyle
                    {
                        background-color: #5D7B9D;
                        font-weight: bold;
                        color: White;
                    }

                    .GridViewFooterStyle
                    {
                        background-color: #5D7B9D;
                        font-weight: bold;
                        color: White;
                    }

                    .GridViewRowStyle
                    {
                        background-color: #F7F6F3;
                        color: #333333;
                    }

                    .GridViewAlternatingRowStyle
                    {
                        background-color: #FFFFFF;
                        color: #284775;
                    }

                    .GridViewRowStyle td, .GridViewAlternatingRowStyle td
                    {
                        border: 1px solid #EBE9ED;
                    }

                    .GridViewSelectedRowStyle
                    {
                        background-color: #E2DED6;
                        font-weight: bold;
                        color: #333333;
                    }

                    .GridViewPagerStyle
                    {
                        background-color: #284775;
                        color: #FFFFFF;
                    }

                    .GridViewPagerStyle table /**//* to center the paging links*/
                    {
                        margin: 0 auto 0 auto;
                    }
        </style>

    这时一个完整的对gridView的样式表就已经定义完成了.现在来实现它的应用

    <asp:GridView CssClass="GridViewStyle" runat="server" >
        
    <FooterStyle CssClass="GridViewFooterStyle" />
        
    <RowStyle CssClass="GridViewRowStyle" />   
        
    <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
        
    <PagerStyle CssClass="GridViewPagerStyle" />
        
    <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
        
    <HeaderStyle CssClass="GridViewHeaderStyle" />
    </asp:GridView>

  • 相关阅读:
    PAT甲题题解-1017. Queueing at Bank (25)-模拟
    PAT甲题题解-1015. Reversible Primes (20)-素数
    PAT甲题题解-1013. Battle Over Cities (25)-求联通分支个数
    PAT甲题题解-1012. The Best Rank (25)-排序水题
    POJ 3384 Feng Shui
    POJ 3525 Most Distant Point from the Sea
    HDU 1115 Lifting the Stone
    FJ省队集训最终测试 T2
    FJ省队集训最终测试 T3
    考前总结小本本
  • 原文地址:https://www.cnblogs.com/ly5201314/p/1331923.html
Copyright © 2020-2023  润新知