一言点击可更换

This commit is contained in:
底层用户 2022-05-22 13:50:08 +08:00
parent 30c55aaa29
commit 5f79695cef
4 changed files with 30 additions and 3 deletions

View File

@ -5,7 +5,7 @@
background: #ffffffcc; background: #ffffffcc;
border-radius: 8px; border-radius: 8px;
opacity: 0.25; opacity: 0.25;
z-index: 10086; z-index: 99999999;
pointer-events: none; pointer-events: none;
transition: 0.2s ease-in-out; transition: 0.2s ease-in-out;
transition-property: background, opacity, transform; transition-property: background, opacity, transform;

View File

@ -771,6 +771,7 @@ input[type="radio"]:checked+label {
/*Aplayer*/ /*Aplayer*/
.box-right { .box-right {
flex: 0 54%; flex: 0 54%;
max-width: 54%;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;

View File

@ -79,8 +79,8 @@ class Cursor {
render() { render() {
if (this.pos.prev) { if (this.pos.prev) {
this.pos.prev.x = Math.lerp(this.pos.prev.x, this.pos.curr.x, 0.15); this.pos.prev.x = Math.lerp(this.pos.prev.x, this.pos.curr.x, 0.45);
this.pos.prev.y = Math.lerp(this.pos.prev.y, this.pos.curr.y, 0.15); this.pos.prev.y = Math.lerp(this.pos.prev.y, this.pos.curr.y, 0.45);
this.move(this.pos.prev.x, this.pos.prev.y); this.move(this.pos.prev.x, this.pos.prev.y);
} else { } else {
this.pos.prev = this.pos.curr; this.pos.prev = this.pos.curr;

View File

@ -92,6 +92,32 @@ fetch('https://v1.hitokoto.cn?max_length=24')
}) })
.catch(console.error) .catch(console.error)
var time = 0;
$('#hitokoto').click(function () {
if (time == 0) {
time = 1;
var index = setInterval(function () {
time--;
if (time == 0) {
clearInterval(index);
}
}, 1000);
fetch('https://v1.hitokoto.cn?max_length=24')
.then(response => response.json())
.then(data => {
$('#hitokoto_text').html(data.hitokoto)
$('#from_text').html(data.from)
})
.catch(console.error)
} else {
iziToast.show({
timeout: 2000,
iconUrl: './img/icon/warn.png',
message: '你点太快了吧'
});
}
});
//获取天气 //获取天气
//每日限量 100 次 //每日限量 100 次
//请前往 https://www.tianqiapi.com/ 申请(免费) //请前往 https://www.tianqiapi.com/ 申请(免费)