Troubleshooting Local Image Loading in Google Chrome Extensions
Despite incorporating local images within a Chrome extension, users encounter difficulties displaying them using CSS. This issue warrants addressing.
The core issue lies in Chrome's i18n support, which allows CSS references to extension assets. To resolve this, consider the following:
background-image:url('chrome-extension://__MSG_@@extension_id__/images/main.png');
By implementing these steps, local images can be successfully loaded and displayed using CSS within Chrome extensions.
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