离子如何保持固定的背景在浏览观点 [英] Ionic How to keep fixed background while browsing the views

查看:172
本文介绍了离子如何保持固定的背景在浏览观点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用离子项目的标签模板,并设置了一个背景图像。但是,当过渡掷状态时,背景也受动画。我想,背景始终保持固定在整个应用程序(过渡扔状态和子状态)。

I'm using a tabs template for an Ionic project and have set the a background image. However, when the transition throw states occurs, the background is also affected by the animation. I want that the background always stay fixed on entire application ( on transition throw states and sub-states).

本项目充分体现了这个问题:

This project exemplifies the problem:

链接的http:// codepen.io /匿名/笔/ ogYymB

我也试过背景属性分配给身体,但它不能正常工作。

I also tried to assign the background property to the body but it doesn't work.

所以,没有任何人知道如何始终保持背景图像固定的,只有动画内容?

So, does anybody know how to always keep the background image fixed and only animate the content ?

推荐答案

因此​​,有因为在测试14的一些新功能,一些新的并发症,但你仍然可以完成你想要只使用CSS的东西。

So, there are some new complications because of some new features in beta 14, but you can still accomplish what you want using only CSS.

请参阅此笔:

的http://$c$cpen.io/andrewmcgivery/pen/azBjdB

相关CSS:

body {
    background: 
url(http://cdn.wonderfulengineering.com/wp-content/uploads/2014/07/background-wallpapers-32.jpg) ;
    background-attachment:fixed;
    background-position: center;
}

body .view-container.tab-content {
  background-color: transparent;
}

body .pane, .menu, .view, .list, .item       {
    background: transparent;
}

这篇关于离子如何保持固定的背景在浏览观点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆