Gist: https://gist.github.com/bolasblack/7260065
代码:
在程序里,这段 HTML 是以字符串形式获取到,然后写入 WebView 的:
NSString* htmlString = [NSString stringWithFormat:@"%@",content];
NSLog(@"%@",htmlString);
[_webView loadHTMLString:htmlString baseURL:nil];
content 就是上述的 html 。
当 WebView 载入完成后,发现 .name, .tel, .mail 三个类的背景图片都没有被加载
大家遇到过这样的问题吗?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
指出一下明显的问题: 你的style标签不在head里。根据W3C标准,这样的style定义是应该被直接忽略的。