根据后台所返回的数据动态调整样式
1、th:class
<label th:class="${t.isRequired}==1 ? 'col-sm-3 control-label is-required' : 'col-sm-3 control-label' " th:text="${t.fieldTitle}+':'"></label>
2、th:classappend
<label class="col-sm-3 control-label" th:classappend="${t.isRequired}==1 ? ' is-required' : '' " th:text="${t.fieldTitle}+':'"></label>
标签:样式,thymeleaf,添加,th,动态,class From: https://www.cnblogs.com/person008/p/17310578.html