Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11273

Use css background-image for browser platform instead of img

    XMLWordPrintableJSON

Details

    Description

      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';

      Attachments

        Activity

          People

            Unassigned Unassigned
            lamuertepeluda Vito Macchia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: