代码如下:
<div class="card">
<div class="card-header">
每日一言 </div>
<div class="card-body" id="hitokoto">
</div></div><script src="https://v1.hitokoto.cn/?encode=js&select=%23hitokoto" defer></script>
还有一个朋友提供的api(今日诗词):https://www.jinrishici.com/
代码如下
<div class="card">
<div class="card-header">
每日诗词 </div>
<div class="card-body">
<span id="jinrishici-sentence">正在加载今日诗词....</span>
</div></div><script src="https://sdk.jinrishici.com/v2/browser/jinrishici.js" charset="utf-8"></script>