2012-01-03 43 views
2

我有这个html页面: 代码:UIWEbView透明背景:有可能吗?

<html> 
<!-- ... -->or explicity set the background-color CSS property to transparent: 

<head> 
<style type="text/css"> 
html, 
body { 
background-color: transparent; 
} 
</style> 

<!-- ... --> 
</head> 

,并用uivewbview: 代码:

[webv setBackgroundColor:[UIColor colorWithWhite:1 alpha:0.8]]; 
[webv loadRequest....]; 

页面显示,但背景是白色的。 如果我在页面结束之后开始结束之前滚动页面,我可以看到透明度(页面显示在哪里) 我可以有一个完全透明的html页面,所以我可以看到uiwebview的背景吗? 感谢

回答

9

只是设置web视图的不透明性以没有

webv.opaque = NO; 
+1

也:[webv setBackgroundColor:的UIColor clearColor]]; – sefiroths 2012-09-24 12:23:38