History Today 历史上的今天配置

History-Today 懒人版历史上的今天,只需添加上“id”就能使用

建议使用 Chrome 浏览器,体验最佳效果。

玩html的朋友们都知道,感觉自己的html总少些什么,现在给大家做了一个这个小玩意儿,可以直接嵌入在html里

1 简介

  • 支持自定义样式css
  • 只需要在你的<p>或<span>里加上id就可以了
  • 无需占用本地空间,联网搜索

2 使用方法

用法:在你的<p><span>中加上id=”tohis”


示例:

<p id="tohis"></p>


  • 在使用它之前,你需要引用js库:
    1. <script src="https://cdn.jsdelivr.net/gh/softosdev/history-today/tohis.js "></script>
    2. <script src="https://softosdev.github.io/history-today/tohis.js "></script> (不推荐)
  • 或将 tohis.js下载
  • <script src="scripts/tohis.js"></script>


    完整代码:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    <!DOCTYPE html>
    <html>

    <head>
    <meta charset="utf-8">
    <title>历史上的今天</title>
    </head>

    <body>
    <p id="tohis"></p>
    <script src="https://cdn.jsdelivr.net/gh/softosdev/history-today/tohis.js"></script>
    </body>

    </html>

    3 嵌入示例

    image.png