是否可以“硬编码”将用户样式表 (.css) 放入 Android 应用程序内的 webview 活动中?

发布于 2024-12-25 15:31:58 字数 258 浏览 2 评论 0原文

是否可以在 Android 应用程序中使用 WebView 提供并强制使用 css 文件,就像 userContent.css 在 Firefox 中的工作方式一样?

背景:作为应用程序的一部分,我需要显示我无法控制源代码并希望在应用程序内设置它们样式的网页。

基本上,我无法触摸网页,但可以通过外部 CSS 使它们适合我的主题。 (这是无聊的文档,还没有什么性感的,但它必须反映 CI。)

我很感激任何提示,因为在这种情况下,文档并不完全有帮助。谢谢!

Is it possible from within an Android app, with WebView, to provide, and enforce the use of a css-file, just like the way userContent.css works in Firefox?

Background: I need, as part of an app, to display webpages that I don't have control over the sourcecode and want to style them from within the app.

Basically, I can't touch the webpages but could, via an external css, make them fit my theme. (It's boring documentation, nothing sexy yet, but it has to reflect the CI.)

I'd appreciate any hint as the docs aren't exactly helpful, in this case. Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文