2
在UIWebView中使用CSS,我怎樣才能以合理的方式創建從左到右的文本流?我在找什麼CSS?使用內聯CSS在iPhone OS上的UIWebView中對齊文本?
例
<p style='text-align: justify;'>
不起作用。什麼去而不是justify
?
在UIWebView中使用CSS,我怎樣才能以合理的方式創建從左到右的文本流?我在找什麼CSS?使用內聯CSS在iPhone OS上的UIWebView中對齊文本?
例
<p style='text-align: justify;'>
不起作用。什麼去而不是justify
?
剛貼上舊項目。我希望這可以幫助
NSString *css = [NSString stringWithFormat:
@"<html><head><style>body { background-color: transparent; text-align: %@; font-size: %ipx; color: white;} a { color: #172983; } </style></head><body>",
@"justify",
16];
NSMutableString *desc = [NSMutableString stringWithFormat:@"%@%@<br><br>%@<br><br>%@%@",
css,
sampleText,
sampleText,
sampleText,
@"</body></html>"];
UIWebView *webView = (UIWebView *)[self viewWithTag:WEB_VIEW_TAG];
[webView loadHTMLString:desc baseURL:nil];
謝謝。我明白了,但這足夠準確。 – Moshe 2010-06-17 17:43:54