I'm trying to use a image texture for my webpage body background. My webpage is shown in an Android webview.
Here is my CSS :
body
{
font-family: helvetica;
font-size: 12px;
color: #555555;
padding: 10px;
/*background-color:#000000;*/
background-image:url(bg_header_sample.png);
}
the css is inside an HTML file named Template.html. both Template.html and bg_header_sample.png are in the same assets folder : assets/global.
If I un-comment the background-color:#000000; line my body turn to black as wanted.
but with the current CSS my body stay transparent ...
The solution was to do it programmatically :
webView.setBackgroundResource(R.drawable.backgroundImage);
As explain in this question : Set a background image for a webview in Android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With