问题
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.
回答1:
See How to add stylesheet for JEditorPane.
In general http://
and file://
includes and embedded CSS are no problem.
回答2:
Use a style="" attribute in the individual HTML tags
来源:https://stackoverflow.com/questions/14061665/how-do-i-style-html-in-a-jeditorpane