style.css放在资产目录下,content为html代码 try { //设置行间距 content = "<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\" />"content; webview.loadDataWithBaseURL("", content, "text/html", "utf-8", null); } catch (Exception e) { e.printStackTrace(); }