【问题标题】:how can I set height and width of vrview iframe in percentages如何以百分比设置 vrview iframe 的高度和宽度
【发布时间】:2019-02-12 18:20:36
【问题描述】:

我正在使用vrview 在 html 文件中显示 360 度图像,但显然它只接受数字作为值,如下所示:

var vrView = new VRView.Player('#vrview', {
              image: '{}',
              is_stereo: false,
              height: 95,
              width: 100,
              default_yaw: 200
            });

但是当我尝试将宽度或高度更改为 100% 等 % 值时,它不起作用。

有没有办法根据窗口大小来操作它的大小?

【问题讨论】:

    标签: html google-vr


    【解决方案1】:

    必须写成:

    var vrView = new VRView.Player('#vrview',{
      image:'{}',
      is_stereo: false,
      height: '100%',
      width: '100%',
      default_yaw: 200,
    });
    

    为了获得覆盖所有网页的高度,正文和包装高度也需要设置为 100%。

    【讨论】:

      猜你喜欢
      • 2012-04-05
      • 2014-02-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-24
      • 2010-10-17
      • 2013-03-24
      • 2012-10-03
      相关资源
      最近更新 更多