开发者

Change hover style if any child is disabled

开发者 https://www.devze.com 2023-02-08 04:59 出处:网络
I have a table, with a pretty nice style. Td and th elements, on hover, change their background color. However, if there is a disabled element in that row, it still displays lighter colors than things

I have a table, with a pretty nice style. Td and th elements, on hover, change their background color. However, if there is a disabled element in that row, it still displays lighter colors than things with disabled elements in them should look. Does anyone know a way to change the hover background if there is a disabled开发者_StackOverflow中文版 element inside? I can use jQuery.


I'd probably approach the problem by adding a class to the hovered item to modify its behavior when you disable child elements, as css won't let you set styles on a parent object based on properties of their children. Check out this post: Complex CSS selector for parent of active child

0

精彩评论

暂无评论...
验证码 换一张
取 消