• vue在页面嵌入别的页面或者是视频2


     vue在页面嵌入别的页面或者是视频

    以下是嵌入页面

    <iframe name="myiframe" id="myrame" src="http://xxx.com/" frameborder="0" align="left" width="100%" height="100%"  scrolling="auto" marginWidth=0 marginHeight=0 class="iframesty" onload="changeFrameHeight()">
       <p class="tip">你的浏览器不支持iframe标签</p>
    </iframe>
    scrolling="auto"=》可以滚动
    scrolling="no"=》不可以滚动
    onload="changeFrameHeight()=》根据适配的font-size大小改变初始化时候的高度
    在index.html页面写js
    window.addEventListener("orientationchange", resetrem);
          window.addEventListener("resize",resetrem);
          function resetrem(){
              var fs = parseInt(document.querySelector("html").style.fontSize)
              return fs
          }
          function changeFrameHeight(){
              var fs = resetrem()
              var ifm = document.getElementById('myrame');
              ifm.height = document.documentElement.clientHeight - fs-6
          }

    嵌入视频

    <div class="toast" :class="{tshow:toastshow}" style="90%;height:300px">
         <iframe frameborder="0" :src="this.video_url" allowFullScreen="true" style="100%;height:300px" ></iframe>
    </div>
    <div :class="{mask:maskshow}" @click="hidden_video" @touchmove.prevent></div>


  • 相关阅读:
    作业3.14下
    作业3.14上
    作业3.13 下
    作业 3.13上
    2017.3.10上午
    2017.3.9上午
    2017.3.23-morning
    2017.3.22-morning
    2017.3.21-afternoon
    2017.3.21-morning
  • 原文地址:https://www.cnblogs.com/dudu123/p/10148578.html
Copyright © 2020-2023  润新知