How do I style HTML in a JEditorPane?

假如想象 提交于 2019-12-11 19:04:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!