微件:Live2d:修订间差异
舰R百科,玩家自由编辑的战舰少女R百科
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第28行: | 第28行: | ||
{ | { | ||
l2d_canvas = document.getElementById('live2d-canvas'); | l2d_canvas = document.getElementById('live2d-canvas'); | ||
var bg = document.getElementById('live2d-background').style; | |||
var vw = document.documentElement.clientWidth; | var vw = document.documentElement.clientWidth; | ||
if (l2d_canvas.width > vw * 0.9) { | if (l2d_canvas.width > vw * 0.9) { | ||
l2d_canvas.height *= vw * 0.9 / l2d_canvas.width; | l2d_canvas.height *= vw * 0.9 / l2d_canvas.width; | ||
l2d_canvas.width = vw * 0.9; | l2d_canvas.width = vw * 0.9; | ||
bg.height = l2d_canvas.height + 'px'; | |||
bg.width = l2d_canvas.width + 'px'; | |||
} | } | ||
| 第37行: | 第41行: | ||
document.getElementById('live2d-button').style.display = 'none'; | document.getElementById('live2d-button').style.display = 'none'; | ||
var time = new Date().getHours(); | var time = new Date().getHours(); | ||
if (time < 6) | if (time < 6) | ||
bg.backgroundImage = 'url(/wg_img/ccbResources/user_detail_bg1.png)'; | bg.backgroundImage = 'url(/wg_img/ccbResources/user_detail_bg1.png)'; | ||