在webView的delegate回调方法 - (void)webViewDidFinishLoad:(UIWebView *)webView;中写上一下语句即可
//字体大小
[webView stringByEvaluatingJavaScriptFromString:@"document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust= '330%'"];
//字体颜色
[webView stringByEvaluatingJavaScriptFromString:@"document.getElementsByTagName('body')[0].style.webkitTextFillColor= 'gray'"];
//页面背景色
[webView stringByEvaluatingJavaScriptFromString:@"document.getElementsByTagName('body')[0].style.background='#2E2E2E'"];
或者:
UIFont * fontSize = [UIFont systemFontOfSize:16];
UIColor *fontColor = [UIColorFromRGB(0x666666)];
NSString *jsString = [[NSString alloc] initWithFormat:@"document.body.style.fontSize=%f;document.body.style.color=%@",fontSize,fontColor];
[webView stringByEvaluatingJavaScriptFromString:jsString];