使用foreach将后台数据库中所有的信息循环出来,并且使用栅格化,使得标签可以适应屏幕
//将后台数据库中的专家的信息放进bookstrap中的div盒子中,
//并用foreach循环将所有的专家信息寻循环出来
<c:forEach items="${page.list}" var="list">
<div class="col-sm-6 col-md-2">
<div class="thumbnail" style="text-align:center">
<a href="${ctx}/ty/expert/get?id=${list.id}">
//使用c:if;如果列表中的照片信息不为空的话将list中的照片循环出来
<c:if test="${!empty list.photo }">
<img style="width:140px;height:140px" src="${list.photo }">
</c:if>
//如果列表中的照片信息为空的话,则使用系统默认的照片
<c:if test="${empty list.photo }">
<img style="width:140px;height:140px"src="/static/images/touxiang.png">
</c:if>
</a>
<div class="caption">
//循环list中的专家姓名
<h5>${list.expertname}</h5>
<p>
<a href="${ctx}/ty/expert/form?id=${list.id}" class="btn btn-primary" role="button">修改</a>
<a href="${ctx}/ty/expert/delete?id=${list.id}" class="btn btn-default" role="button">删除</a>
</p>
</div>
</div>
</div>
</c:forEach>