实现回复列表功能

功能模块:展示回复列表
在这里插入图片描述
前端代码:

<!--回复列表-->
            <h4>
                <span th:text="${question.commentCount}"></span> 个回复
            </h4>
            <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12 comment-sp">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 comments" th:each="comment:${comments}">
                <!--回复者的信息-->
                <div class="media" >
                    <div class="media-left">
                        <a href="#">
                            <img class="media-object img-rounded"
                                 th:src="${comment.user.avatarUrl}">
                        </a>
                    </div>
                    <div class="media-body">
                        <h5 class="media-heading" >
                            <span th:text="${comment.user.name}"></span>
                        </h5>
                        <div th:text="${comment.content}"></div>
                        <div class="menu">
                            <span class="glyphicon glyphicon-thumbs-up icon"></span>
                            <span class="glyphicon glyphicon-comment icon"></span>
                            <span class="pull-right" th:text="${#dates.format(question.gmtCreate,'yyyy-MM-dd')}"></span>
                        </div>
                    </div>
                </div>
            </div>

css样式:

.btn-comment{
    float: right;
    margin-bottom: 10px;
}
.comments{
    padding-bottom: 5px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.comment-sp{
    margin-top: 0;
}
/*评论下方的菜单样式*/
.menu {
    color: #999;
    margin-top: 5px;
}
.menu .icon {
    margin-right: 6px;
    font-size: 15px;
    cursor: pointer;
}
.menu .icon:hover{
    color: #499ef3;
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值