我需要将背景图像添加到电话号码中,该电话号码包含在加载到UIWebView中的HTML码中
NSString *stringToReplace = [NSString stringWithFormat:@"<a style=\"color:white; background-color:#707070; text-decoration:none\" href=\"compose://%@\">%@</a>",substring,substring];
newString = [newString stringByReplacingOccurrencesOfString:substring withString:stringToReplace];我已经设法改变了背景颜色,但我需要放一张图片作为背景。主要目标是在电话号码后面创建一个圆角的lightGray背景。
我已经找到问题所在了solution
谢谢,
发布于 2011-09-02 20:33:14
我不太理解你的代码,也许你应该使用css background images
background: #afdafd url('path...');
/*def.color. back.img.*/
<a style=\"color:white; background:#707070 url('/images/rounded-corner.png'); text-decoration:none\" href=\"compose://%@\">%@</a>https://stackoverflow.com/questions/7283289
复制相似问题