0
私はこのようなCSSのgridviewを持っています。私はそれにホバーをしようとします。それは私にいくつかの行CSSを使用しているGridview ASP.netのマウスオーバーホバー
<style type="text/css">
.gridview
{
font-family: "arial";
background-color: #FFFFFF;
width: 100%;
font-size: small;
}
.gridview th
{
background: #7AC142;
padding: 5px;
font-size: small;
}
.gridview th a
{
color: #003300;
text-decoration: none;
}
.gridview td
{
background: #D9EDC9;
color: #333333;
font: small "arial";
padding: 4px;
}
.gridview tr.even td
{
background: #FFFFFF;
}
.rows
{
background-color: #fff;
font-family: Arial;
font-size: 14px;
color: #000;
min-height: 25px;
text-align: left;
border: none 0px transparent;
}
.rows:hover td
{
background-color: #ff8000;
font-family: Arial;
color: #fff;
text-align: left;
}
.selectedrow
{
background-color: #ff8000;
font-family: Arial;
color: #fff;
font-weight: bold;
text-align: left;
}
.gridview td a:hover
{
background-color: #ff8000;
font-family: Arial;
color: #fff;
text-align: left;
}
</style>
そして、以下の私のGridViewのある
<asp:GridView ID="gvAsset" RowStyle-CssClass="rows" CssClass="gridview" AlternatingRowStyle-CssClass="even"
runat="server" OnRowCommand="gvAsset_RowCommand" EmptyDataText="No Record Available"
AutoGenerateColumns="False" AllowSorting="True" AllowPaging="False" DataKeyNames="Asset_ID"
Width="100%" OnSorting="gvAsset_Sorting" OnRowDataBound="gvAsset_RowDataBound">
<RowStyle />
<AlternatingRowStyle />
<HeaderStyle />
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:UpdatePanel ID="updPanel2" runat="server">
<ContentTemplate>
<asp:LinkButton ID="lnkEdit" CommandName="EditRow" CommandArgument='<%# Eval("Asset_ID") %>'
runat="server">Edit</asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField ReadOnly="True" DataField="Asset_ID" SortExpression="Asset_ID" HeaderText="ID"></asp:BoundField>
</Columns>
<PagerStyle HorizontalAlign="Center"></PagerStyle>
</asp:GridView>
を働いていないですが、私のCSSホバーは最初の行での作業ではなく、2行目のさ。 3行目は動作していますが、4行目などは動作していません。 (それは偶数行では機能しません)私はCSSでうまくいきません。すでにhssまたはtdをcssコードの1行からCSSコードの別の行に変更しようとしていますが、まだ動作していません。
ありがとうございます。 –