Page 1 of 2
Image resize problem
Posted: Wed Feb 18, 2015 1:59 pm
by zimennik
Hello. I have a problem.
I have background image with this CSS:
.workspace
{
background: url("images/back1.png") center;
background-repeat:no-repeat;
background-size:cover;
}
In web its look fine:
But when I building app for iOS I have some sort of this:
And when I change phone orientation, background image not changing.
Please, help me with this.
Image resize problem
Posted: Wed Feb 18, 2015 2:23 pm
by Maryna Brodina
Image resize problem
Posted: Wed Feb 18, 2015 2:29 pm
by zimennik
Nope. Still have empty space between background and footer.
Image resize problem
Posted: Wed Feb 18, 2015 2:43 pm
by Maryna Brodina
Please try the following code on page Load
preApperyio("mobilecontainer1").css({
"background-image": "url(" + Apperyio.getImagePath("image.jpg") + ")",
"background-size": "cover"
})/pre
where image.jpg is the name of your picture. I've just tried and it worked for me.
Image resize problem
Posted: Fri Feb 20, 2015 2:22 pm
by zimennik
Sorry, I still have this problem.
On iOS screen seems fine, but i can scroll down and there is empty space before footer.
upd. Could this be because of that I use appery.io tester for iOS?
Image resize problem
Posted: Sat Feb 21, 2015 11:42 am
by zimennik
Also, this how it's look on another device.
There is a small space and scrollbar appering.
Image resize problem
Posted: Sun Feb 22, 2015 10:09 pm
by zimennik
I still have a problem. Please help!
Image resize problem
Posted: Mon Feb 23, 2015 5:30 am
by Yurii Orishchuk
Hi Zimennik,
It seems you try to apply background for wrong container.
Please try following js code:
pre
[data-role="content"]{
background: url(http://mypets.kiev.ua/sites/default/files/admin/59_13.jpg);
background-size: cover;
}
/pre
Regards.
Image resize problem
Posted: Mon Feb 23, 2015 8:38 am
by zimennik
Thank you! I think this is it.
And one more, can I somehow call this component from javascript?
UPD.
Nope... Don't work.
Image resize problem
Posted: Mon Feb 23, 2015 3:21 pm
by Evgene Karachevtsev
Hello Zimennik,
Could you please clarify, what exactly doesn't work - Yurii's approach?