开发者

How can i insert an image inside html code?

开发者 https://www.devze.com 2023-04-01 19:45 出处:网络
i need to add a background image to a phone number that is contained inside an HTML code that i load into a UIWebView

i need to add a background image to a phone number that is contained inside an HTML code that i load into a UIWebView

NSString *stringToReplace = [NSString stringWithFormat:@"<a style=\"color:white; background-color:#707070; text-decoration:none\" href=\"compose://%@\">%@</a>",substring,substring];
    newString = [newString stringByReplacingOccurrencesOfString:sub开发者_如何学编程string withString:stringToReplace];

I've managed to change the background color, but instead i need to put an image as background. The main goal is to make a lightGray Background with rounded corners behind the phone number.

I've found what was the problem solution

Thanks,


i dont really undderstand your code, maybe you should use 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>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号