舰R百科是靠无数志愿编辑者持续地建设更新完善的。编辑非常简单,无需代码知识,请勇于更新页面!
编辑入门 | 资助百科 | 留言讨论页 | 微博@舰R百科 | 百科编辑讨论Q群:366818861

微件:Live2d:修订间差异

来自舰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 bg = document.getElementById('live2d-background').style;
     var time = new Date().getHours();
     var time = new Date().getHours();
    console.log(time);
     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)';

2016年10月5日 (三) 19:10的版本

WIP