String css = "<style> img{max-width:100%;width:auto !important;height:auto !important;min-height:10px;} p{margin-top:0 !important;margin-bottom:0 !important;}</style>";
String html = "<html><header>" + css + "</header><body style='margin:0;padding:0'>" +getIntent().getStringExtra("data" ) + "</body></html>";
mWebView.getWebView().loadDataWithBaseURL(null, html, "text/html", "utf-8", null);
WebView加载富文本页面,页面整体大小问题
最新推荐文章于 2019-10-21 14:31:24 发布