我的网站上有一段youtube视频。我想知道是否有任何方法将文本放在视频顶部,给它一个特定的标题。
另外,除了在视频的左边,我怎么做同样的事情呢?我也在使用引导。
发布于 2014-09-21 04:19:23
您可以使用z索引或位置来执行此操作。
<div class="container">
<iframe width="560" height="315" src="//www.youtube.com/embed/YXVoqJEwqoQ" frameborder="0" allowfullscreen></iframe>
<div class="my-text"> This is my text</div>
</div>CSS
body {
background: #efefea
}
.container {
width: 600px;
margin: 0 auto;
padding: 10px;
position: relative;
}
iframe {
marign: 0 auto;
}
.my-text {
position: absolute;
color: #fff;
padding: 10px 0px;
text-align: center;
font-size: 50px;
background: rgba(0,0,0, 0.5);
top: 20px;
left: 0;
right: 0;
}http://jsfiddle.net/websiddu/dy4exbcp/1/
https://stackoverflow.com/questions/25955672
复制相似问题