喜欢那种时间的错落感,时间轴无疑能很好地表现出来。
首先看下效果
这样放在关于页面用于写博客发展历程岂不美哉
css 代码:/* 站点动态时间轴 */
#teamnewslist ol{list-style:none;margin-left: 36px;padding-left: 14px;border-left: 2px solid #eee;font-size: 18px;color: #666;}
#teamnewslist b{font-size: 12px;font-weight: normal;color: #999;display: block;position: relative;margin-bottom:5px;}
#teamnewslist b::after{position: absolute;top: 6px;left: -22px;content: '';width: 14px;height: 14px;border-radius: 50%;background-color: #fff;border: 2px solid #ccc;box-shadow: 2px 2px 0 rgba(255,255,255,1), -2px -2px 0 rgba(255,255,255,1)}
#teamnewslist li{list-style:none;margin: 0 0 20px 0;line-height: 100%;}
#teamnewslist li:hover{color: #555;}
#teamnewslist li:hover b::after{border-color: #C01E22;}
#teamnewslist li:hover b{color: #C01E22;}
将上面代码放在主题的自定义CSS里有些主题自定义css不生效那就把这段CSS放到你要放的文章页面里并用两个!!!包住使之生效,在编辑页面或文章时,然后按以下格式编辑内容
html 代码:<div id="teamnewslist">
<ol>
<li><b>2019年01月</b>以姓名代码3328更换新域名3328bk.cn并作为本博客域名永久使用</li>
<li><b>2018年12月</b>使用 Wordpress 搭建了博客并命名某良博客,并购买了第一个主题mkblog</li>
</ol>
</div>
之后添加时光轴记录的时候只需要一条一条添加就可以了
html 代码:<li><b>xxxx年xx月</b>内容</li>
因为是CSS实现的理论上都能适用