EYHN / hexo-helper-live2d

Add the Sseexxyyy live2d to your hexo!
GNU General Public License v2.0
3.86k stars 469 forks source link

2D看板娘在首页被放大 #101

Closed fATwaer closed 6 years ago

fATwaer commented 6 years ago

Issue

首页的Miku被放大了

Description

安装好插件以后,出了首页的模型被不正常放大,不过其他页面没有问题。

Actual behavior 实际行为

unnormal

问题页面

Steps to reproduce the behavior 复现步骤

__config.yml

# Live2D
## https://github.com/EYHN/hexo-helper-live2d
live2d:
  enable: true
  # enable: false
  pluginRootPath: live2dw/ # Root path of plugin to be on the site (Relative)
  pluginJsPath: lib/ # JavaScript path related to plugin's root (Relative)
  pluginModelPath: assets/ # Relative model path related to plugin's root (Relative)
  scriptFrom: local # Default
  # scriptFrom: jsdelivr # jsdelivr CDN
  # scriptFrom: unpkg # unpkg CDN
  # scriptFrom: https://cdn.jsdelivr.net/npm/live2d-widget@3.x/lib/L2Dwidget.min.js # Your custom url
  model:
    use: live2d-widget-model-miku # npm-module package name
    # use: wanko # folder name in (hexo base dir)/live2d_models/
    # use: ./wives/wanko # folder path relative to hexo base dir
    # use: https://cdn.jsdelivr.net/npm/live2d-widget-model-wanko@1.0.5/assets/wanko.model.json
    scale: 1
    hHeadPos: 0.5
    vHeadPos: 0.618
  display:
    superSample: 2
    width: 150
    height: 300
    position: left
    hOffset: 0
    vOffset: -20
  mobile:
    show: true
    scale: 0.5
  react:
    opacityDefault: 0.7
    opacityOnHover: 0.2
hexo 主题 : hiker

另外,请问下作者能提供一个设置选项,让她们能在选定的页面出现吗? 非常感谢回答问题!

@EYHN @xiazeyu

EYHN commented 6 years ago

首页有 css 污染了 live2d 的 canvas

在首页添加以下css可以解决这个问题

div#live2d-widget canvas {
    top: initial;
    left: initial;
    z-index: initial;
    width: initial;
    height: initial;
    pointer-events: initial;
}
fATwaer commented 6 years ago

首页恢复了,非常感谢!