旋转小人
1、找到主题内Sidebar.php 添加以下代码
<div class="sidebar-box classListBox twopeople position-relative">
<div class="container" style="height:200px;">
<canvas class="illo"width="800"height="800"style="max-width: 200px; max-height: 200px; touch-action: none; width: 640px; height: 640px;"></canvas>
</div>
<script src="https://blog.yshgg.cn/usr/themes/Cuteen/static/js/xuanzhuanxiaoren.js"></script>
<script src="https://blog.yshgg.cn/usr/themes/Cuteen/static/js/xuanzhuanxiaoren2.js"></script>
<script id="rendered-js"src="https://blog.yshgg.cn/usr/themes/Cuteen/static/js/xuanzhuanxiaoren.js"></script>
</div>
注意:直接复制代码可能会有删除空格的现象,暂时需要你手动添加空格使代码生效!
2、再添加css样式
.twopeople{
margin: 0;
align-items: center;
justify-content: center;
text-align: center;
margin-bottom: 1rem;
}
canvas {
display: block;
margin: 0 auto;
cursor: move;
}
基于 原文链接 修改
2022年01月17日 14:46
赞一个
2021年12月07日 12:37
不错,必须顶一下!
2020年12月28日 18:51
看着你的代码 我又改了改!哈哈哈哈。
2020年12月28日 18:52