【问题标题】:How to float/position Youtube video to the right of <p> text?如何将 Youtube 视频浮动/定位到 <p> 文本的右侧?
【发布时间】:2014-06-19 21:04:31
【问题描述】:

我们还没有学习 javascript,因为这是一个初学者课程,但我需要以某种方式将我的 youtube 视频浮动或定位到右侧。我的 CSS 文件中的浮动 id 为 float: right;

<div id="content">
        <h1>Welcome!</h1>
        <p>"Do You Even Lift?" is an organization that will help you and many others get motivated to get in shape. If you want to get stronger,
         lose weight, gain weight or simply live a healthier life, you've come to the right place.<p>
         <p>For those that already lift, have lifted previously in their lifetime, are not sure if they lift or not, this video will be helpful in answering that question.</p>
        </div>
        <div id="float">
        <iframe src="http://www.youtube.com/embed/OloLS5kTrVs" width="400" height="315" frameborder="0" allowfullscreen>
        </iframe>
        </div>










<hr>
<div id="footer">Copyright &copy; 2014 Corey Osmon
    </div>


    </body>
</html>

【问题讨论】:

  • 哦,我知道了,我有 2 个单独的文件,并且我一直打开我没有编辑的浮动 id 的文件。 掌心

标签: css html youtube css-float textwrangler


【解决方案1】:

Demo

HTML

<iframe src="http://www.youtube.com/embed/OloLS5kTrVs" width="400" height="315" frameborder="0" allowfullscreen></iframe>

 <h1>Welcome!</h1>

<p>"Do You Even Lift?" is an organization that will help you and many others get motivated to get in shape. If you want to get stronger, lose weight, gain weight or simply live a healthier life, you've come to the right place.</p>
<p>For those that already lift, have lifted previously in their lifetime, are not sure if they lift or not, this video will be helpful in answering that question.</p>
<div class="clear"></div>
<hr>
<div id="footer">Copyright &copy; 2014 Corey Osmon</div>

css

iframe {    
    width:50%;    
    float:right;    
}

.clear {    
    clear:both;    
}

【讨论】:

  • 肯定是旧帖子,但我现在遇到了这个问题。问题是“可点击区域”不想与播放按钮对齐。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-05-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多