Inconsistent Box Shadow Appearance on Table Rows Across Browsers
CSS box-shadow applied to table rows (
To resolve this issue, it is recommended to utilize the transform property in conjunction with the box-shadow attribute. Adding scale(1,1) to the transform property forces the browser to re-render the element, ensuring that the box-shadow effect is applied uniformly.
Here is the updated CSS code:
tr:hover { transform: scale(1,1); -webkit-transform: scale(1,1); -moz-transform: scale(1,1); box-shadow: 0px 0px 5px rgba(0,0,0,0.3); -webkit-box-shadow: 0px 0px 5px rgba(0,0,0,0.3); -moz-box-shadow: 0px 0px 5px rgba(0,0,0,0.3); }
By adding this code snippet, the box shadow will now appear consistently across supported browsers.
The above is the detailed content of Why Does Box Shadow on Table Rows Behave Differently in Different Browsers?. For more information, please follow other related articles on the PHP Chinese website!