xml布局
<WebView
android:id="@+id/wv_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:layerType="software" />
代码里这么写
WebView mWebVew = (WebView) findViewById(R.id.wb_content);
// 设置背景色
mWebView.setBackgroundColor(0);
// 设置填充透明度
mWebView.getBackground().setAlpha(0)