我正在尝试制作简单的应用程序单页应用程序。实际上,当我使用 <ion-content class="bg" style="position:absolute!important">
时,我拍摄了放置在 上的背景图像。 position:absolute 但是它显示在小区域。我需要在整个竞争中显示。换句话说在整个竞争标签完整屏幕中。
这是我的代码
http://codepen.io/anon/pen/pvYdNM
<html ng-app="ionicApp">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Ionic List Directive</title>
<link href="//code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
<script src="//code.ionicframework.com/nightly/js/ionic.bundle.js"></script>
</head>
<body >
<ion-view>
<ion-header-bar class=" bar bar-positive ">
<h1 class="title">Title!</h1>
</ion-header-bar>
<ion-content class="bg" style="position:absolute!important">
<h1 >contend</h1>
</ion-content>
<ion-footer-bar class=" bar bar-footer bar-positive" style="position:fixed!important">
<h1 class="title">Fotter!</h1>
</ion-footer-bar>
</ion-view>
</body>
</html>
最佳答案
只要告诉它它应该有多大。
类似于:
<ion-content class="bg" style="position:absolute; left: 0; right: 0; top: 43px; bottom: 43px;">
应该可以。
关于javascript - 为什么背景图片不显示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29329519/