本文转载于姑の小屋,稍加修改。
云开的博客原文:https://chenyunxin.cn/posts/4200755795.html
欢迎访问我的博客交流哟😜:https://chenyunxin.cn/
🌈今日诗词
今日诗词API,是一个可以返回一句古诗词名句的接口。它可以通过图片和 JSON 格式调用。今日诗词 API 根据不同地点、时间、节日、季节、天气、景观、城市进行智能推荐。
🍊修改CSS
修改今日诗词显示的样式,也可以不修改哟😜,在\themes\next\source\css\_custom\custom.styl
中适当位置添加:
/*诗*/
.poem-wrap {
position: relative;
width: 730px;
max-width: 80%;
border: 2px solid #797979;
border-top: none;
text-align: center;
margin: 80px auto;
}
.poem-wrap h1 {
font-size: 30px;
position: relative;
margin-top: -20px;
display: inline-block;
letter-spacing: 4px;
color: #797979
}
.poem-wrap p {
width: 70%;
margin: auto;
line-height: 30px;
color: #797979;
}
.poem-wrap p#poem {
font-size: 25px;
}
.poem-wrap p#info {
font-size: 15px;
margin: 15px auto;
}
.poem-border {
position: absolute;
height: 2px;
width: 27%;
background-color: #797979;
}
.poem-right {
right: 0;
}
.poem-left {
left: 0;
}
@media (max-width: 685px) {
.poem-border {
width: 18%;
}
}
@media (max-width: 500px) {
.poem-wrap {
margin-top: 60px;
margin-bottom: 20px;
border-top: 2px solid #797979;
}
.poem-wrap h1 {
margin: 20px 6px;
}
.poem-border {
display: none;
}
}
🍭使用
在需要使用的.html文件或.md中添加:
<div class