Home > Web Front-end > CSS Tutorial > Why Does Box Shadow on Table Rows Behave Inconsistently Across Browsers?

Why Does Box Shadow on Table Rows Behave Inconsistently Across Browsers?

Patricia Arquette
Release: 2024-10-31 10:44:01
Original
334 people have browsed it

Why Does Box Shadow on Table Rows Behave Inconsistently Across Browsers?

Box Shadow on Table Rows Acting Erratically Across Browsers

Applying CSS box shadows to table rows presents inconsistencies in browser rendering. While some browsers display the shadow as intended, others fail to render it completely.

To address this issue, adding the transform: scale(1,1) property with box-shadow solves the problem. This ensures consistent shadow rendering across browsers.

Updated CSS:

<code class="css">tr:hover {
  transform: scale(1);
  -webkit-transform: scale(1);
  -moz-transform: scale(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);
}</code>
Copy after login

Updated jsFiddle: https://jsfiddle.net/ampicx/5p91xr48/

The above is the detailed content of Why Does Box Shadow on Table Rows Behave Inconsistently Across Browsers?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template