Html 在对象顶部覆盖文本
我的网站上有一个youtube视频。我想知道是否有任何方法可以在视频的顶部布置文本,给它一个特定的标题Html 在对象顶部覆盖文本,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我的网站上有一个youtube视频。我想知道是否有任何方法可以在视频的顶部布置文本,给它一个特定的标题 在视频的左侧,我该怎么做呢?我也在使用引导程序。您可以使用z索引或位置来完成此操作 <div class="container"> <iframe width="560" height="315" src="//www.youtube.com/embed/YXVoqJEwqoQ" frameborder="0" allowfullscreen></iframe&
在视频的左侧,我该怎么做呢?我也在使用引导程序。您可以使用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>
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;
}