使用移动表AngularJS显示数据

时间:2015-12-22 16:51:31

标签: html angularjs

我想开发一个收到JSON的表,我的目标是将这些数据显示在只显示前4个JSON条目的表中,如果有超过4个项目,它将在第一个条目中消失并显示第5个条目间隔10秒。像图像轮播,但垂直移动。我添加了html标签<marquee>,但这样就可以移动内容,但是表格字段与标题表的大小不同。

view.html

<html>
<body ng-app="schoolApp">
<div id="report" ng-controller="classesController">
<div class="modal-header">
    <h4 class="modal-title"><strong>Students</strong></h4>
</div>
<br>
</div>
<div>
<table class="table table-bordered">
    <tr>
        <th>Number</th>
        <th>Name</th>
        <th>Age</th>
        <th>Grade</th>
    </tr>
</table>
<table class="table table-bordered ">
<marquee direction="up">
     <tr ng-repeat="student in classArray">
        <td align="center">{{student.number}}</td>
        <td align="center">{{student.name}}</td>
        <td align="center">{{student.age}}</td>
        <td align="center">{{student.grade}}</td>
    </tr>
</marquee>
</table>
</div>
</body>
</html>

0 个答案:

没有答案
相关问题