Search code examples
cssnativescriptnativescript-angular

Show images in grayscale in Nativescrpt


I'm traying to show images in gray in my nativescript app. But it seems to not work.

I use this in my class:

filter: gray; /* IE6-9 */
    -webkit-filter: grayscale(1); /* Google Chrome, Safari 6+ & Opera 15+ */
    filter: grayscale(1); /* Microsoft Edge and Firefox 35+ */

But the images are shown with full color... Is there a trick to make it works?


Solution

  • CSS filter attributes are not supported, use nativescript-image-filters plugin.

    tns plugin add nativescript-image-filters