Correction status:qualified
Teacher's comments:完成的不错。
一、代码截图
二、运行结果
三、代码
<?php $bt='文章评论'; $pls = [ [ 'touxiang' =>'tx.jpg', 'time' =>'2019-09-01', 'duzhe' =>'这部电视剧很不错,这是一部优秀的影视剧,深受大家喜爱!顶起!!!', 'zuozhe' =>'感谢支持' ], [ 'touxiang' =>'tx.jpg', 'time' =>'2019-09-02', 'duzhe' =>'良心好剧!顶起!!!', 'zuozhe' =>'感谢打赏' ], [ 'touxiang' =>'tx.jpg', 'time' =>'2019-09-03', 'duzhe' =>'这是一部优秀的影视剧,深受大家喜爱!顶起!!!', 'zuozhe' =>'感谢支持!' ], ]; ?> <div class="pl"> <h3><?php echo $bt?></h3> <?php foreach( $pls as $k => $v){ echo '<div class="tl">'; echo '<p><img src="/0920/img/'.$v['touxiang'].'"></p>'; echo '<div>'; echo '<p>'.$v['time'].'</p>'; echo '<p>'.$v['duzhe'].'</p>'; echo '<p>'.$v['zuozhe'].'</p>'; echo '</div>'; echo '</div>'; } ?> </div>
点击 "运行实例" 按钮查看在线实例
p{margin:0; padding: 0} .pl h3{ font-size: 1rem;} .tl{display: flex; font-size: 0.8rem; margin-bottom:0.5rem} .tl>p{ flex:0.2; border-radius: 50%} .tl p img{width: 100%;display: block} .tl div{ flex:0.78; margin-left: 2%}
点击 "运行实例" 按钮查看在线实例