CSS window shadow does not work in Chrome

CSS box-shadow works on Mozilla, but not Chrome. If I use a class on a div (i.e. a div with id mydiv ), it works! Why am I not allowed to use the shadow on the tr tag?

 <!DOCTYPE html> <html lang="en"> <head> <style> .item_row:hover { box-shadow: 0px 0px 8px 2px #CCCCCC inset; -moz-box-shadow: 0px 0px 8px 2px #CCCCCC inset; -webkit-box-shadow: 0px 0px 8px 2px #CCCCCC inset; } </style> </head> <body> <div id='mydiv'> <table> <tr class='item_row'> <td>test</td> </tr> </table> </div> </body> </html> 
+4
source share
1 answer

Yes, just tested in Chrome. Instead of applying your css to tr, apply td to your child instead:

 .item_row:hover td { box-shadow: 0px 0px 8px 2px #CCCCCC inset; -moz-box-shadow: 0px 0px 8px 2px #CCCCCC inset; -webkit-box-shadow: 0px 0px 8px 2px #CCCCCC inset; } 
+4
source

Source: https://habr.com/ru/post/1388166/


All Articles