webview設置字體

NSString* string    =   [[_parentDict objectForKey:@"context"] objectForKey:@"text"];css

    string  =   [string stringByReplacingOccurrencesOfString:@"FONT-SIZE"withString:@"a"];web

    string=[string stringByAppendingString:@"<meta name='viewport' content='width=device-width, initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5, user-scalable=no' />"];spa

    string=[string stringByAppendingString:@"<style type=\"text/css\">img{width:1400px;}\n body{ width:1400px;font-size:60px;font-family:\"微軟雅黑\", sans-serif;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}</style>"];scala

[_webViewloadHTMLString:string baseURL:nil];orm

相關文章
相關標籤/搜索