然后我使用了以下方式:
backgounrd-color
但它不会改变div的背景
<tr>
我怎么能实现
仅使用CSS。基本上,您将使用想要的
<div>
在CSS中设置<div>
,并且它将被下面的所有元素继承。因此,现在,当您悬停在该行上时,它将覆盖或设置您在<tr>
中元素的背景颜色。
这里是一个例子。
$('.ui-datagrid-column').live('mousemove',function(){
$(this).css('background-color', 'red');
$(this).children().css('background-color', 'red');
//ui-layout-unit-content ui-widget-content
});
//.ui-layout-container
$('.ui-datagrid-column').live('mouseleave',function(){
$(this).css('background-color', 'white');
$(this).children().css('background-color', 'white');
});
<tr>
tr:hover *