ionic grid(栅格)九宫格制作详解

网友投稿 170 2023-07-27

ionic grid(栅格)九宫格制作详解

本文实例为大家分享了ionic grid九宫格制作的具体代码,供大家参考,具体内容如下

1、Html

腾讯新闻


{{item.text}}


{{item.text}}

2、Controller

appCntrollers.controller('ManageGridCtrl', function ($scope, $timeout, $ionicLoading) {

$ionicLoading.show({

content: 'Loading',

animation: 'fade-in',

showBackdrop: true,

maxWidth: 200,

showDelay: 0

});

$timeout(function () {

$ionicLoading.hide();

$scope.items = [

{ id: 1, text: "111111" }, { id: 2, text: "222222" }, { id: 3, text: "333333" },

{ id: 4, text: "444444" }, { id: 5, text: "555555" }, { id: 6, text: "666666" },

{ id: 7, text: "777777" }, { id: 8, text: "888888" }, { id: 9, text: "999999" },

{ id: 10, text: "aaaaaa" }, { id: 11, text: "bbbbbb" }, { id: 12, text: "cccccc" oNyHq},

];

oNyHq }, 2000);

$scope.alertClick = function (val) {

alert(val);

}

})

3、css

/* 栅格grid */

.col-25{border: 1px solid #ddd;height: 120px;display:flex;justify-content:center;align-items: center;}

.col-25 img {height: 64px; width: 64px;}

.col-25 ul li img {height: 64px; width: 64px;margin-top: 12px}

.col-25 ul li p {text-align: center;}

4、效果图

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:详解angular如何调用HTML字符串的方法
下一篇:数据开发平台: 为什么它是你的业务增长的关键?
相关文章

 发表评论

暂时没有评论,来抢沙发吧~