如何在 JEditorPane 中设置 HTML 样式? [英] How do I style HTML in a JEditorPane?
本文介绍了如何在 JEditorPane 中设置 HTML 样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对此完全迷失了.我需要在 HTML 文件中明确引用的 CSS 吗?如果是这样,我将如何获得它,以及如何将 CSS 应用于 HTML?我读了一些关于 JSoup 能够获取 CSS 的内容.
I'm completely lost on this. Would I need the CSS that is explicitly referenced in the HTML file? If so, how would I get it, and how would I apply the CSS to the HTML? I read something about JSoup being able to get the CSS.
推荐答案
参见 如何为 JEditorPane 添加样式表.一般来说,http://
和 file://
包含和嵌入的 CSS 没有问题.
See How to add stylesheet for JEditorPane.
In general http://
and file://
includes and embedded CSS are no problem.
这篇关于如何在 JEditorPane 中设置 HTML 样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文