在设置背景图像且其大小 (background-size) 设置为 'cover' 或 '100% 100%' 时使用 ionic-2,例如:
background: url("../../img/bg.jpeg");
background-repeat: no-repeat;
background-size: cover;
当键盘打开时,背景图像会调整大小,如何避免这种情况? (这样即使键盘缩小了内容,背景图像大小也保持不变)
最佳答案
使用正确的方式嵌入全屏背景图片:
ion-content {
background: url(images/bg.jpg) no-repeat center center fixed;
background-size: cover;
}
关于android - IONIC2 背景图像在键盘打开时调整大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39682450/