项目描述
上传时间
浏览人数
1.Html
<!--命名空间 :xmlns:th="http://www.thymeleaf.org"--> <html lang="zh" xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="UTF-8"> <title>Title</title> <!--引用js,css--> <script type="text/javascript" th:src="@{/router/jquery.min.js}"></script> <script type="text/javascript" th:src="@{/router/bootstrap.min.js}"></script> <link rel="stylesheet" type="text/css" th:href="@{/router/bootstrap.min.css}"> </head> <body> <div class="container"> <div class="row"> <div class="col-2" style="background-color: #0a53be;height: 550px;margin-top: 15px "></div> <div class="col-8" style="margin-top: 50px ;text-align: center;background-color: #f2e7c3;height: 425px ;"> <table class="table"> <tr> <th>id</th> <th>名字</th> <th>年龄</th> <th>是否结婚</th> <th>分数</th> <th>图片</th> </tr> <tr th:each="s,state:${li}" th:switch="${state.count}"> <td th:text="${s.id}"></td> <td th:text="${s.name}"></td> <td th:text="${s.age}"></td> <td th:text="${s.is_married? '已婚':'未婚'}" th:if="${s.is_married == true}" class="sp"></td> <td th:text="${s.is_married? '已婚':'未婚'}" th:if="${s.is_married == false}" class="psp"></td> <td th:text="${s.score}" th:if="${s.score >=80 }" class="ps ps-1"></td> <td th:text="${s.score}" th:if="${s.score <80 && s.score>=70}" class="ps ps-2"></td> <td th:text="${s.score}" th:if="${s.score <70 && s.score>=60}" class="ps ps-3"></td> <td th:text="${s.score}" th:unless="${s.score>60}" class="ps no-pass"></td> <td><img th:src="${s.pic}" width="50px"></td> </tr> </table> </div> <div class="col-2" style="background-color: #0a53be;height: 550px;margin-top: 15px "></div> </div> </div> </body>
2.Class