//content是后台返回的h5标签
webview.loadDataWithBaseURL(null,
getHtmlData(content), "text/html", "utf-8", null);
/**
* 加载html标签
*
* @param bodyHTML
* @return
*/
private String getHtmlData(String bodyHTML) {
String head = "<head>" +
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\"> " +
"<style>img{max-width: 100%; width:auto; height:auto!important;}</style>" +
"</head>";
return "<html>" + head + "<body>" + bodyHTML + "</body></html>";
}