Home > Web Front-end > CSS Tutorial > Why Does `transform: scale` Overflow in Chrome with `overflow: hidden` and `border-radius`?

Why Does `transform: scale` Overflow in Chrome with `overflow: hidden` and `border-radius`?

Linda Hamilton
Release: 2024-10-30 20:47:18
Original
847 people have browsed it

Why Does `transform: scale` Overflow in Chrome with `overflow: hidden` and `border-radius`?

Overflow Issue with Transform: Scale in Chrome

Problem:

While attempting to create a zoom effect using CSS transform: scale, it was discovered that the child div extended beyond the boundaries of the parent div when overflow: hidden and border-radius were applied to the parent. This issue persisted even when transitions were added.

Solution:

Adding transform: translateZ(0); to the wrapper element resolved the issue. As detailed in the provided demo, this technique manipulates the third dimension (Z-axis) to enhance performance and counteract the overflow problem.

The above is the detailed content of Why Does `transform: scale` Overflow in Chrome with `overflow: hidden` and `border-radius`?. 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