公告栏添加时钟

页面定制CSS代码

/* 定制公告栏时钟位置 */
#clockdiv {
    /* left, center, right */
    text-align: center;
}

博客侧边栏公告(支持HTML代码)(支持JS代码)

<!-- 添加公告栏时钟 -->
<div id="clockdiv">
    <canvas id="dom" width="120" height="120">时钟canvas</canvas>
</div>
<script type="text/javascript" src="https://files.cnblogs.com/files/shwee/clock.js"></script>
原文地址:https://www.cnblogs.com/bsth/p/10219283.html