css实现时间线

效果:

<ul class="timeline-list">

<li class="timeline-item" v-for="(i, index) in tt" :key="index">

<div class="tail"></div>

<div class="node"></div>

<div class="wrapper">

<div class="times">{{ i.time }}</div>

<div class="cont">{{ i.cont }}</div>

</div>

</li>

</ul>

.timeline-list {

margin: 0;

padding: 16px;

font-size: 12px;

list-style: none;

.timeline-item:last-child .tail {

display: none;

}

.timeline-item {

position: relative;

padding-bottom: 14px;

}

.tail {

position: absolute;

left: 0;

height: 100%;

border-left: 1px dotted #d7d8db;

}

.node {

position: absolute;

background: #fff;

border-radius: 50%;

display: flex;

justify-content: center;

align-items: center;

left: -2px;

width: 6px;

height: 6px;

background: #0a7fef;

}

.wrapper {

position: relative;

top: -6px;

left: 8px;

}

.times {

margin-bottom: 2px;

padding-top: 0px;

line-height: 17px;

color: #373d4a;

font-size: 12px;

}

.cont {

line-height: 17px;

color: #8b8b8b;

font-size: 12px;

}

}

相关推荐
wyn200011289 分钟前
JavaWeb的一些基础技术
前端
Hygge-star23 分钟前
Flask音频处理:构建高效的Web音频应用指南
前端·flask·音视频·pygame·csdn开发云
江城开朗的豌豆34 分钟前
JavaScript篇:回调地狱退散!6年老前端教你写出优雅异步代码
前端·javascript·面试
飞鸟malred1 小时前
vite+tailwind封装组件库
前端·react.js·npm
Angindem1 小时前
从零搭建uniapp项目
前端·vue.js·uni-app
java干货1 小时前
深度解析:Spring Boot 配置加载顺序、优先级与 bootstrap 上下文
前端·spring boot·bootstrap
Uyker1 小时前
微信小程序动态效果实战指南:从悬浮云朵到丝滑列表加载
前端·微信小程序·小程序
小小小小宇2 小时前
前端按需引入总结
前端
小小小小宇2 小时前
React 的 DOM diff笔记
前端
小小小小宇2 小时前
react和vue DOM diff 简单对比
前端