"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > Why is Border-Radius Not Working for Images in Chrome?

Why is Border-Radius Not Working for Images in Chrome?

Published on 2024-11-04
Browse:518

Why is Border-Radius Not Working for Images in Chrome?

Border-Radius Not Displaying Images inWebKit

Despite applying border-radius styles to the #screen element using all prefixes and the standard syntax, the element remains untouched in Google Chrome, while it appears as expected in Firefox and Internet Explorer 9. This issue arises due to a bug in Chrome's handling of border trimming for images.

Workaround to Resolve Chrome Bug:

To resolve this issue, implement the following workaround:

.element-that-holds-pictures {
   perspective: 1px; /* any non-zero value will work */
}

This technique will modify the element's perspective, which forces the rendering engine to behave correctly. It does not affect the display of the element, unlike other workarounds such as setting the opacity to 0.99.

Release Statement This article is reprinted at: 1729686816 If there is any infringement, please contact [email protected] to delete it
Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3