css background-size: cover not working when navigating
I am using today's bleeding edge just from master release of ionic. I noticed that my background image resizes incorrectly.
I have two ion-views both with a css class that sets the following:
background: url("img/voetbalveld.png") no-repeat center center fixed; -webkit-background-size: cover!important; background-size: cover!important; When I open the app and see the first view, the background looks good. However, when I navigate to the second view
This sounds exactly what background-size: cover; is meant to do, no?
Do you want the background image to be as large as possible while showing the image? Or do you want to always cover the full background, even if it means part of the image may not be shown?
It sounds like it could be a problem with the custom CSS, can you provide a codepen example?
Hi,
I want the image to cover the full background, even if it means part of the image may not be shown. I have an image that is larger than the viewport, but I still want it to be shown as much as possible with respect of ratio.
In this codepen you can see a large image being correctly shown with the cover property: http://codepen.io/anon/pen/raObpO
When you turn of the cover property you see what I am seeing when I navigate to my second page on my iOS 6.1.6 (iphone3). The image is shown as is (and thus looked zoomed in because it is too large for the screen).
btw when I want to have a look at the css inside web inspector on safari, the background image 'jumps' to the correct size (it uses the cover property) when I click on the view element.
Also, at the moment of the page transition I see that both the background of the first page and the second page (that during transition moves on top of the first) both get incorrect backgrounds. When I move back to the first page, the background is always shown correctly again.
Greetings, @mobilabgit!
My sensors indicate that you have created an issue on our tracker that is more asking for usage help than an actual error with Ionic framework.
This Github issue tracker is used to track features, problems, and development of the framework.
If you wish to get help using the framework itself, the recommended place is the forum.
Thank you for allowing me to assist you.
+1