html:
<ul *ngFor="let timeline of timeLineData"> <li class="li-show">{{timeline.tips}}</li> <li class="li-none">{{timeline.time}}</li> </ul>
css:
> ul { position : relative; list-style-image : url('../../../assets/img/point.png'); //时间条的点 > li { margin-bottom : 10px; } .li-none { //去除第二个节点的 list-style-img list-style : none;; } } > ul::before { // 加时间条的竖线 position : absolute; top : 2px; left : -15px; width : 1px; height : 133%; content : ' '; background : #E3E7EF; } > ul:last-child::before { //去除最后一个时间条的竖线 background : transparent; }复制代码
angular 时间条
html:<ul *ngFor="let timeline of timeLineData"><li class="li-show">{{timeline.tips}}</li><li class="li-none">{{time...
·
转载于:https://juejin.im/post/5d633444e51d4561f95eea5c
更多推荐
所有评论(0)