Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

content_scripts 里面如何引入 css ? #38

Open
twoer opened this issue Jun 2, 2023 · 2 comments
Open

content_scripts 里面如何引入 css ? #38

twoer opened this issue Jun 2, 2023 · 2 comments

Comments

@twoer
Copy link

twoer commented Jun 2, 2023

我在 manifest 里面按照以下方式配置,发现无效。

content_scripts: [ { "matches": ["https://juejin.cn/*"], js: ['src/content/index.ts'], css: ['src/content/index.css'], }, ],

@gradywetherbee
Copy link

Add your css file's path to "web_accessible_resources" and you should be good to go.

Source: https://stackoverflow.com/questions/11553600/how-to-inject-css-using-content-script-file-in-chrome-extension

@mordechaim
Copy link

CSS changes still won't trigger a auto refresh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants