C# “如何拥有”;onmouseover“;在css中突出显示?
我该如何将其转换为cssC# “如何拥有”;onmouseover“;在css中突出显示?,c#,asp.net,css,C#,Asp.net,Css,我该如何将其转换为css protected void MasterCust_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowState == DataControlRowState.Alternate) { e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#
protected void MasterCust_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowState == DataControlRowState.Alternate)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#eefef0';");
}
}
类似这样的情况?假设
网格。突出显示选择您的元素:
grid.highlight
{
background-color:Blue;
}
否则,您必须修改该选择器。假设网格。突出显示选择您的元素:
grid.highlight
{
background-color:Blue;
}
grid.highlight:hover
{
background-color: blue;
}
否则,您必须修改该选择器。您可以使用悬停
选择器
grid.highlight:hover
{
background-color: blue;
}
IE 6、7和8有时会在悬停
选择器上出现问题,因此,对于这些问题,您可以使用。您可以使用悬停
选择器
grid.highlight:hover
{
background-color: blue;
}
IE 6、7和8有时会在悬停
选择器上出现问题,因此,对于这些问题,您可以使用。我认为这就是您需要的:
grid.highlight:hover
{
background-color:Blue;
}
只需添加伪类:将鼠标悬停在上,我想这就是您要寻找的:
grid.highlight:hover
{
background-color:Blue;
}
只需在IE6上为鼠标添加伪类:hover
,只允许在锚点()中使用:hover伪选择器,而不允许在锚点()中使用。好吧,无论什么:hover
都应该解决该问题,并使其与IE6上的任何元素一起工作。我不认为OP应该考虑主要的替代物(例如JavaScript)来补偿IE6用户。IE6只允许:在锚()中使用悬停伪选择器,而不是你擅长Go.AFAIK,<代码>:不管是:悬停< /代码>应该修复这个问题,并使它与IE6上的任何元素一起工作。我认为OP不应该考虑主要的替代方案(例如JavaScript)来补偿IE6用户。