mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(refresher): make refresher css not create gap at end of list
This commit is contained in:
66
js/ext/angular/test/list-fit.html
Normal file
66
js/ext/angular/test/list-fit.html
Normal file
@@ -0,0 +1,66 @@
|
||||
|
||||
<html ng-app="ionic">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
|
||||
|
||||
<title>Sample UL</title>
|
||||
|
||||
<link href="../../../../dist/css/ionic.css" rel="stylesheet">
|
||||
<script src="../../../../dist/js/ionic.bundle.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<header-bar title="'Sample UL'" type="bar-positive"></header-bar>
|
||||
|
||||
<content has-header="true" scroll="true" ng-controller="ContentCtrl" on-refresh="onRefresh()" has-footer="true" padding="false">
|
||||
|
||||
<refresher></refresher>
|
||||
|
||||
<ul class="list">
|
||||
<li class="item">This list should *exactly* fit</li>
|
||||
<li class="item">between header and footer (no gap),</li>
|
||||
<li class="item">even with pull-to-refresh.</li>
|
||||
<li class="item">4</li>
|
||||
<li class="item">5</li>
|
||||
<li class="item">6</li>
|
||||
<li class="item">7</li>
|
||||
<li class="item">8</li>
|
||||
<li class="item">9</li>
|
||||
<li class="item">10</li>
|
||||
<li class="item">11</li>
|
||||
<li class="item">12</li>
|
||||
<li class="item">13</li>
|
||||
<li class="item">14</li>
|
||||
<li class="item">15</li>
|
||||
<li class="item">16</li>
|
||||
<li class="item">17</li>
|
||||
<li class="item">18</li>
|
||||
<li class="item">19</li>
|
||||
<li class="item">20</li>
|
||||
<li class="item">21</li>
|
||||
<li class="item">22</li>
|
||||
<li class="item">23</li>
|
||||
<li class="item">24</li>
|
||||
<li class="item">25</li>
|
||||
<li class="item">26</li>
|
||||
</ul>
|
||||
</content>
|
||||
|
||||
<footer-bar type="bar-assertive">
|
||||
<h1 class="title">Footer!</h1>
|
||||
</footer-bar>
|
||||
|
||||
<script>
|
||||
function ContentCtrl($scope, $timeout) {
|
||||
$scope.onRefresh = function() {
|
||||
$timeout(function() {
|
||||
$scope.$broadcast('scroll.refreshComplete');
|
||||
}, 1000);
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -46,9 +46,9 @@ body, .ionic-body {
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
|
||||
.content {
|
||||
.content {
|
||||
// used for content areas not using the content directive
|
||||
position: relative
|
||||
position: relative
|
||||
}
|
||||
|
||||
.scroll-content {
|
||||
@@ -141,9 +141,12 @@ body, .ionic-body {
|
||||
// Scroll refresher (for pull to refresh)
|
||||
.scroll-refresher {
|
||||
overflow: hidden;
|
||||
margin-top: -60px;
|
||||
top: -60px;
|
||||
height: 60px;
|
||||
position: relative;
|
||||
left: 0;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
margin: auto;
|
||||
|
||||
.icon-refreshing {
|
||||
display: none;
|
||||
|
||||
Reference in New Issue
Block a user