You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Vito Macchia (JIRA)" <ji...@apache.org> on 2016/05/16 17:01:12 UTC
[jira] [Created] (CB-11273) Use css background-image for browser
platform instead of img
Vito Macchia created CB-11273:
---------------------------------
Summary: Use css background-image for browser platform instead of img
Key: CB-11273
URL: https://issues.apache.org/jira/browse/CB-11273
Project: Apache Cordova
Issue Type: Improvement
Components: Plugin SplashScreen
Affects Versions: 3.2.0
Environment: any
Reporter: Vito Macchia
Priority: Minor
In platform browser, Splashscreen plugin could use css background image instead of img child for displaying image, resulting in less distortion.
Moreover, zIndex should have higher values or it gets overlapped by other elements (this is true also with current img implementation).
My suggestion is adding some properties to the div style such as:
z-index: 9999;
background-image: url(<splashscreen name>);
background-size: contain;
And removing the img child which would become useless.
Just edit src/browser/SplashScreenProxy.js at SplashScreen.show method (about line 68):
localSplash.style.zIndex = 9999;
localSplash.style.backgroundImage = 'url(' + imgSrc + ')';
localSplash.style.backgroundSize = 'contain';
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org