th:each内部进行条件判断来更改样式
需求 : 遍历集合并每隔两个换行
<div>
<input type="checkbox"
th:each ="p,pIndex:${pList}"
th:utext ="${pIndex.index%2==0?p.name:'p.name+'</br>'}"
</div>
<div>
<input type="checkbox"
th:each ="p,pIndex:${pList}"
th:utext ="${pIndex.index%2==0?p.name:'p.name+'</br>'}"
</div>