你好我試圖做一個皮膚GridView控件包含一個CSS文件尋呼機風格在asp.net
每一件事情做工精細,但懸停在尋呼機號碼的風格並沒有改變字體的顏色 我不知道爲什麼
皮膚代碼:
<asp:GridView runat="server" Width="95%" AutoGenerateColumns="False" SkinId="GridBlue"
CellPadding="4" ForeColor="#333333" HorizontalAlign="Center" Font-Size="10" Font-Names="Arial" BorderWidth="2px" AllowPaging="true" PageSize="5"
AllowSorting="true">
<HeaderStyle Font-Bold="True" ForeColor="#faf6e0" Height="30px" CssClass="gv_hd" />
<FooterStyle Font-Bold="True" ForeColor="#faf6e0" Height="30px" CssClass="gv_ft" />
<RowStyle BackColor="#faf6e0" CssClass="gv_row" Height="30px" />
<AlternatingRowStyle BackColor="#ede0b9" CssClass="gv_row" Height="30px"/>
<PagerSettings Mode="Numeric" />
<PagerStyle Height="35px" CssClass="gv_pgr" VerticalAlign="Middle" HorizontalAlign="Center" />
<EditRowStyle BackColor="#dfc987" VerticalAlign="Middle" HorizontalAlign="Center" CssClass="gv_slct" ForeColor="#5f5f5f" />
<SelectedRowStyle BackColor="#dfc987" VerticalAlign="Middle" HorizontalAlign="Center" font-bold="true" CssClass="gv_slct" ForeColor="#5f5f5f" />
<EmptyDataTemplate>
<center><h1 class="gv_mpty">No Records Found</h1></center>
</EmptyDataTemplate>
</asp:GridView>
CSS代碼:
.gv{text-align:center;}
.gv_hd{height:22px;text-decoration:none;border:#5f5f5f solid 2px;background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #548975), color-stop(1, #37705a));background:-moz-linear-gradient(top, #548975 5%, #37705a 100%);background:-webkit-linear-gradient(top, #548975 5%, #37705a 100%);background:-o-linear-gradient(top, #548975 5%, #37705a 100%);background:-ms-linear-gradient(top, #548975 5%, #37705a 100%);background:linear-gradient(to bottom, #548975 5%, #37705a 100%);}
.gv_hd a{text-decoration:none;}
.gv_hd a:hover{text-decoration:underline;}
.gv_hd a:active{text-decoration:underline;}
.gv_ft{padding:10px;text-decoration:none;border:#5f5f5f solid 2px;background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #548975), color-stop(1, #37705a));background:-moz-linear-gradient(top, #548975 5%, #37705a 100%);background:-webkit-linear-gradient(top, #548975 5%, #37705a 100%);background:-o-linear-gradient(top, #548975 5%, #37705a 100%);background:-ms-linear-gradient(top, #548975 5%, #37705a 100%);background:linear-gradient(to bottom, #548975 5%, #37705a 100%);}
.gv_row{text-align:center;color:#5f5f5f;padding:}
.gv_row a{text-decoration:none;}
.gv_row a:hover{text-decoration:underline;}
.gv_pgr{color:#5f5f5f;padding:20px;background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #faf6e0), color-stop(1, #e7d6a1));background:-moz-linear-gradient(top, #faf6e0 5%, #e7d6a1 100%);background:-webkit-linear-gradient(top, #faf6e0 5%, #e7d6a1 100%);background:-o-linear-gradient(top, #faf6e0 5%, #e7d6a1 100%);background:-ms-linear-gradient(top, #faf6e0 5%, #e7d6a1 100%);background:linear-gradient(to bottom, #faf6e0 5%, #e7d6a1 100%);}
.gv_pgr a{font-weight:bold;margin-top:10px;background-color:transparent;padding:4px 10px;text-decoration:none;border:1px solid #d9c074;}
.gv_pgr a:hover{font-weight:bold;background-color:#548975;border:1px solid #d9c074;color:White;}
.gv_pgr a:active{font-weight:bold;background-color:#548975;color:#faf6e0;border:1px solid #d9c074;}
.gv_pgr span{background-color:#548975;color:#faf6e0;border:1px solid #d9c074;padding:4px 10px;}
.gv_mpty{color:#5f5f5f;}
.gv_slct a{text-decoration:none;text-align:center;}
.gv_slct a:hover{text-decoration:underline;text-align:center;}
懸停在傳呼機的字體沒有改變
這不是典型的ASP重要,請重新標記。 – Paul 2014-10-13 07:38:18