I want to create app in Nativescript with fullscreen image on page. I have to use background-image: url('~/images/background.jpg');
. But how to make it full screen.
Thanks for your help
You need to use the NativeScript supported CSS properties to achieve this.
I've used the following CSS on a background-image attached to the <Page>
view before and it works fine.
.coverImage {
background-image: url('~/images/kiss.jpg');
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
This does not work with animated gif. My style:
.page{
background-image: url("~/assets/images/animated.gif") black;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
The gif is shown, centered and enlarged, so great, but static: the animation does not moves.
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