Gridview样式的CSS控制

Gridview样式的CSS控制

页面代码:

.<asp:GridView ID="gvCustomres" runat="server"
. DataSourceID="customresDataSource"
. AutoGenerateColumns="False"
. GridLines="None"
. AllowPaging="true"
. CssClass="mGrid"
. PagerStyle-CssClass="pgr"
. AlternatingRowStyle-CssClass="alt">
. <Columns>
. <asp:BoundField DataField="CompanyName" HeaderText="Company Name" />
. <asp:BoundField DataField="ContactName" HeaderText="Contact Name" />
. <asp:BoundField DataField="ContactTitle" HeaderText="Contact Title" />
. <asp:BoundField DataField="Address" HeaderText="Address" />
. <asp:BoundField DataField="City" HeaderText="City" />
. <asp:BoundField DataField="Country" HeaderText="Country" />
. </Columns>
.</asp:GridView>
.<asp:XmlDataSource ID="customresDataSource" runat="server" DataFile="~/App_Data/data.xml"></asp:XmlDataSource>

css代码

..mGrid {
. width: %;
. background-color: #fff;
. margin: 5px 10px ;
. border: solid 1px #;
. border-collapse:collapse;
.}
..mGrid td {
. padding: 2px;
. border: solid 1px #c1c1c1;
. color: #;
.}
..mGrid th {
. padding: 4px 2px;
. color: #fff;
. background: # url(grd_head.png) repeat-x top;
. border-left: solid 1px #;
. font-size: .9em;
.}
..mGrid .alt { background: #fcfcfc url(grd_alt.png) repeat-x top; }
..mGrid .pgr { background: # url(grd_pgr.png) repeat-x top; }
..mGrid .pgr table { margin: 5px ; }
..mGrid .pgr td {
. border-width: ;
. padding: 6px;
. border-left: solid 1px #;
. font-weight: bold;
. color: #fff;
. line-height: 12px;
. }
..mGrid .pgr a { color: #; text-decoration: none; }
..mGrid .pgr a:hover { color: #; text-decoration: none; }
上一篇:Redis解读(4):Redis中HyperLongLog、布隆过滤器、限流、Geo、及Scan等进阶应用


下一篇:jQuery简介及语法