0
我在一个UIWebView中显示了一些HTML/css,这些HTML/css是用来显示数据表的。为什么iOS 5上的UIWebView没有将宽度应用到空元素
具体来说,问题是通过css在<td>
元素上设置的宽度不适用于iPhone 4s上的空<td>
单元格。它在iPad上工作,但不在我的iPhone 4s或iOS 5模拟器上工作?
我已经尝试将生成的html/css从控制台中直接复制到桌面上的文件中,并且它在桌面Safari和Firefox中也完美工作。
在我去之前的任何想法提交错误报告。
这里是生成的CSS代码:
[htmlPage appendString:@"<!DOCTYPE HTML><html><head><meta name=\"viewport\" content=\"initial-scale = 1.0\">\n"];
[htmlPage appendString:@"<style type=\"text/css\">"];
[htmlPage appendFormat:@"body {font-family:\"Courier New\"; font-size:14px; font-weight:bold; background-color:%@;}", cs.bgHTML];
[htmlPage appendString:@"table {margin:auto; border-collapse:collapse;}"];
[htmlPage appendFormat:@"th {padding-bottom:4px; color:%@;}", cs.labelHTML];
[htmlPage appendString:@".row-label {width:10px; padding-right:7px;}"];
[htmlPage appendFormat:@"td {padding:3px; border:1px solid %@; font-weight:bold; color:%@; text-align:center; width:45px; height:45px;}", cs.gridHTML, cs.aspectTextHTML];
[htmlPage appendFormat:@".glyphs {font-family:iPhemeris; color:%@; border:none;}", cs.labelHTML];
[htmlPage appendFormat:@"td .glyphs {color:%@;}", cs.aspectGlyphHTML];
[htmlPage appendString:@"</style></head><body>"];