【发布时间】:2017-03-11 22:49:15
【问题描述】:
我是 ionic 框架的新手。我试图让我的离子页面设计正确,但我正面临与滚动相关的问题。以下是我的 index.html 代码:-
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link rel="manifest" href="manifest.json">
<!-- un-comment this code to enable service worker
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js')
.then(() => console.log('service worker installed'))
.catch(err => console.log('Error', err));
}
</script>-->
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
</head>
<body ng-app="starter">
<ion-side-menus>
<ion-side-menu-content>
<ion-nav-bar class="bar-positive">
<ion-nav-buttons side="left">
<button class="button button-icon ion-navicon" menu-toggle="left"></button>
</ion-nav-buttons>
<ion-nav-buttons side="right">
<button class="button button-icon ion-search"></button>
<button class="button button-icon ion-ios-email"></button>
<button class="button button-icon ion-ios-person"></button>
</ion-nav-buttons>
<h1 class="title"> Main Nav bar</h1>
</ion-nav-bar>
<ion-header-bar class="bar bar-balanced bar-subheader">
<button class="button button-icon icon ion-chevron-left"></button>
<button class="button">ABC</button>
<h2 class="title">Sub Header</h2>
</ion-header-bar>
<ion-footer-bar class="bar bar-footer bar-positive">
Footer
</ion-footer-bar>
<ion-nav-view>
<ion-view>
<ion-content>
<h1> Sub header example 1</h1>
<h1> Sub header example 2</h1>
<h1> Sub header example 3</h1>
<h1> Sub header example 4</h1>
<h1> Sub header example 5</h1>
<h1> Sub header example 6</h1>
<h1> Sub header example 7</h1>
<h1> Sub header example 8</h1>
<h1> Sub header example 9</h1>
<h1> Sub header example 10</h1>
<h1> Sub header example 11</h1>
<h1> Sub header example 12</h1>
<h1> Sub header example 13</h1>
<h1> Sub header example 14</h1>
<h1> Sub header example 15</h1>
</ion-content>
</ion-view>
</ion-nav-view>
</ion-side-menu-content>
<ion-side-menu side="left">
<ul class="list">
<li class="item">first
</ul>
</ion-side-menu>
</ion-side-menus>
</body>
</html>
它显示了 UI,以下是问题:- 1) 有一些间隙,如下图所示:-
我不知道,我在使用 ion-content 和 ion-view 时犯了什么错误。 提前致谢。
【问题讨论】:
标签: html css angularjs ionic-framework