好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

基于html5实现的图片墙效果

本文实例讲述了基于ht ML 5实现的图片墙效果,分享给大家供大家参考。具体实现方法如下:

这里有一组数据需要用图片墙的效果来显示, 这些数据是动态的, 用 Angular js来维护, 可增加和删除的.
界面上每行最多4个单元格.

以下是代码:


复制代码

代码如下:

<!DOCTY PE html>
<html ng-app="app">
<head lang="en">
< ;m eta charset="UTF-8">
<link rel="stylesheet" hr ef="css/bootstrap.min.css">
<script src="js/angular.min.js"></script>
<t IT le>表格界面</title>
<style type="text/css">
ul{list -s tyle:none;}
</style>
</head>
<body ng-controller="myCtrl">
<div class="row">
<div class="col-sm-12">
<h3 class="label -i nfo">{{title}}</h3>
<input type="button" value="Add new list" class=" BT n- Primary ">
</div>
</div></p> <p><div class="row">
<ul class="">
<li ng-repeat="i in tasklist.all">
<div class="col-xs-6 col-sm-4 col-md-3">
<div class="thumbn ai l"></p> <p> <input type="text" ng-model="i.title" style="width: 100%">
<ul>
<li ng-repeat="j in i.list">
<input type="checkbox" ng-model="j.done">
<input type="text" ng-model="j.item">
</li>
</ul></p> <p>
</div>
</div>
</li></p> <p> </ul></p> <p></div></p> <p>
<script>
VAR app=angular.module("app",[], function () {
console. LOG ('started');
});</p> <p> var myTaskList={
"all": [
{ title:"这是第一个列表",
list:[{ "done":"false", "item":"明细1"},
{ "done":"false", "item":"明细2"},
{ "done":"false", "item":"明细3"},
{ "done":"false", "item":"明细43"}
]},</p> <p> { title:"这是第2个列表",
list:[{ "done":"false", "item":"明细1"},
{ "done":"false", "item":"明细2"},
{ "done":"false", "item":"明细33"},
{ "done":"false", "item":"明细4"}
]},</p> <p> { title:"这是第3个列表",
list:[{ "done":"false", "item":"明细1"},
{ "done":"false", "item":"明细25"},
{ "done":"false", "item":"明细3"},
{ "done":"false", "item":"明细4"}
]},
{ title:"这是第一个列表",
list:[{ "done":"false", "item":"明细1"},
{ "done":"false", "item":"明细2"},
{ "done":"false", "item":"明细3"},
{ "done":"false", "item":"明细43"}
]},</p> <p> { title:"这是第2个列表",
list:[{ "done":"false", "item":"明细1"},
{ "done":"false", "item":"明细2"},
{ "done":"false", "item":"明细33"},
{ "done":"false", "item":"明细4"}
]},</p> <p> { title:"这是第3个列表",
list:[{ "done":"false", "item":"明细1"},
{ "done":"false", "item":"明细25"},
{ "done":"false", "item":"明细3"},
{ "done":"false", "item":"明细4"}
]},
{ title:"这是第4个列表",
list:[{ "done":"false", "item":"明细13"},
{ "done":"false", "item":"明细2"},
{ "done":"false", "item":"明细33"},
{ "done":"false", "item":"明细4"}
]}</p> <p></p> <p> ]
};
app.controller("myCtrl",function($scope){
$scope.title="这里用来演示一个表格布局, 例如照片墙";
$scope.tasklist=myTaskList;</p> <p>
});
</script>
</body>
</html>

完整实例代码点击此处 本站下载 。

希望本文所述对大家的html5@R_ 304 _2474@有所帮助。

总结

以上是 为你收集整理的 基于html5实现的图片墙效果 全部内容,希望文章能够帮你解决 基于html5实现的图片墙效果 所遇到的问题。

如果觉得 网站内容还不错, 推荐好友。

查看更多关于基于html5实现的图片墙效果的详细内容...

  阅读:19次