Posts

Showing posts with the label Background

Android WebView Style Background-color:transparent Ignored On Android 2.2

Image
Answer : This worked for me, mWebView.setBackgroundColor(Color.TRANSPARENT); At the bottom of this earlier mentioned issue there is an solution. It's a combination of 2 solutions. webView.setBackgroundColor(Color.TRANSPARENT); webView.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null); When adding this code to the WebViewer after loading the url, it works (API 11+). It even works when hardeware acceleration is ON I had the same issue with 2.2 and also in 2.3. I solved the problem by giving the alpa value in html not in android. I tried many things and what I found out is setBackgroundColor(); color doesnt work with alpha value. webView.setBackgroundColor(Color.argb(128, 0, 0, 0)); will not work. so here is my solution, worked for me. String webData = StringHelper.addSlashes("<!DOCTYPE html><head> <meta http-equiv=\"Content-Type\" " + "content=\"text/html; charset=utf-8\"> </head><body><di...

(CSS) Make A Background Image Scroll Slower Than Everything Else

Answer : I stumbled upon this looking for more flexibility in my parallax speed that I have created with pure CSS and I just want to point out that all these people are wrong and it is possible with pure CSS It is also possible to control the height of your element better. You will probably have to edit your DOM/HTML a bit to have some container elements, in your case you are applying the background to the body which will restrict you a lot and doesn't seem like a good idea. http://keithclark.co.uk/articles/pure-css-parallax-websites/ Here is how you control the height with Viewport-percentage lenghts based on screen size: https://stanhub.com/how-to-make-div-element-100-height-of-browser-window-using-css-only/ .forefront-element { -webkit-transform: translateZ(999px) scale(.7); transform: translateZ(999px) scale(.7); z-index: 1; } .base-element { -webkit-transform: translateZ(0); transform: translateZ(0); z-index: 4; } .background-element { ...