我试着从我在这里读到的内容中添加一个流畅的视频
https://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php
我正在定义
.video-container {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
height: 0;
> iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}和我的html上的
<div class="video-container" style="padding-top:25px; width:720px">
<iframe src="//fast.wistia.net/embed/iframe/xxxx?
videoFoam=true" allowtransparency="true" frameborder="0"
scrolling="no" class="wistia_embed" name="wistia_embed"
allowfullscreen="" mozallowfullscreen="" webkitallowfullscreen=""
oallowfullscreen="" msallowfullscreen="" width="720"></iframe>视频宽度随视频容器宽度而变化,但在顶部和按钮上显示黑色填充。我怎么才能去掉那些黑色的填充物。
发布于 2015-06-04 18:59:12
您是否尝试过在HTML中删除此内容:
style="padding-top:25px; width:720px"我在我的页面上使用了相同的解决方案,它工作得很好。
https://stackoverflow.com/questions/30641884
复制相似问题