【问题标题】:restrict the size of video in a site限制网站中视频的大小
【发布时间】:2015-02-09 13:35:56
【问题描述】:

我们正在使用以下代码在网站中显示视频。

<a width="300" height="300" href="http://www.youtube.com/embed/FEqXWwPFusI"> 

视频通过覆盖整个显示器尺寸显示。

如果我点击 menu_video.jpg 图片,它会以全尺寸显示视频。

但我想显示特定空间的视频。 [宽度=“300”高度=“300”]

建议我找到解决方案。

【问题讨论】:

    标签: html video size


    【解决方案1】:

    试试这个

     <iframe src="http://www.youtube.com/embed/FEqXWwPFusI" width="300" height="300"></iframe> 
    

    【讨论】:

      【解决方案2】:

      你应该使用 video 标签。试试这个:

      <video width="400" height="400" controls>
        <source src="video file" type="video/mp4">
        <source src="video file" type="video/ogg">
      </video>
      

      【讨论】:

      • 非常感谢您的回复。您的解决方案没有奏效,但对我的学习很有帮助....
      【解决方案3】:

      试试这个代码

      <video width="300" height="300" controls>
        <source src="http://www.youtube.com/embed/FEqXWwPFusI" type="video/mp4">
        Your browser does not support HTML5 video.
      </video>
      

      Source link

      或尝试 iframe

      <iframe type="text/html" 
          width="300" 
          height="300" 
          src="http://www.youtube.com/embed/FEqXWwPFusI"
          frameborder="0">
      </iframe>
      

      refer this question for more

      【讨论】:

      • 非常感谢您的回复。你的第一个解决方案没有奏效,但第二个工作正常......
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-30
      • 1970-01-01
      • 1970-01-01
      • 2014-04-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多