【发布时间】:2014-02-21 13:25:16
【问题描述】:
我在我的页面中使用 jquery-oembed-all 来播放 youtube/vimeo 视频。它的大小比我需要的大一些或更大。我尝试更改持有a 的class 的css 属性,但没有成功。虽然我可以通过在 css 中选择 iframe 来更改 iframe 的高度和宽度。但是玩家并没有缩小。还有一个向上和向下箭头符号来隐藏/取消隐藏 iframe 播放器,我不想在我的页面中使用它。如何根据需要自定义 jquery-oembed-all?
或者还有其他方法可以实现吗?
任何帮助将不胜感激。谢谢!
html:
<div id="videos">
<div id="video_wrapper">
<div class="video_container">
<a href="http://www.youtube.com/watch?v=hWnAqFyaQ5s" class="embed" class="video"></a>
<p><a href="">This is the title</a></p>
<p>2 days ago</p>
</div>
<div class="video_container">
<a href="http://vimeo.com/86290699" class="embed video"></a>
<p><a href="">This is the title</a></p>
<p>2 days ago</p>
</div>
<div class="clear_left"></div>
</div>
</div>
css:
#videos #video_wrapper .video_container .video {
width: 180px;
}
【问题讨论】:
-
您的
<a>中不应有两个类属性,而不是class="embed video" -
我的错!谢谢你。已更正。