ionic_content——左右滑动(如地图)

来源:互联网 发布:湖南网络作协 编辑:程序博客网 时间:2024/06/07 07:38
<!DOCTYPE html>
<html>


<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="../../js/ionic/css/ionic.css" />
<script type="text/javascript" src="../../js/ionic/js/ionic.bundle.min.js"></script>
<script>
var app = angular.module("myApp", ["ionic"]);
app.controller("myCtrl", function($scope, $ionicScrollDelegate) {
$scope.scrollTop = function() {
$ionicScrollDelegate.scrollTop();
}
});
</script>
</head>


<body ng-app="myApp" ng-controller="myCtrl">
<ion-header-bar class="bar-positive">
<h3 class="title">ionic_content</h3>
</ion-header-bar>
<ion-content padding="true">
haha
<!--<pre>
这是顶部


a




<button ng-click="scrollTop()">回到顶部</button>



</pre>-->
<ion-scroll zooming="true" scrollbar-x="true" direction="xy" style="width: 100%; height: 1200px">
<div style="width: 5000px; height: 5000px; background: url('http://www.runoob.com/try/demo_source/Europe_geological_map-en.jpg') repeat"></div>
</ion-scroll>
</ion-content>

<ion-footer-bar class="bar-assertive">
<h3 class="title">底部</h3>
</ion-footer-bar>
</body>


</html>
阅读全文
0 0
原创粉丝点击