Home >Web Front-end >CSS Tutorial >How to Solve Untrimmed Image Issue with Border Radius in WebKit Browsers?
WebKit Border Radius Issue with Image Trimming
When applying a rounded border to an element with a background image inWebKit-based browsers like Chrome, users may encounter a problem where the image appears untrimmed, despite the presence of the border-radius property. This issue is particularly noticeable with the Chrome browser.
To address this problem, a workaround has been developed:
Add the following CSS rule to the element that contains the images:
<code class="css">.element-that-holds-pictures { perspective: 1px; /* any non-zero value will work */ }</code>
This workaround will not affect the visual display of the element, unlike the opacity:0.99 workaround, which can also be effective.
The above is the detailed content of How to Solve Untrimmed Image Issue with Border Radius in WebKit Browsers?. For more information, please follow other related articles on the PHP Chinese website!