0
A
回答
1
您可以使用z-index或位置按順序執行此操作。
<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;
}
相關問題
- 1. 覆蓋覆蓋背景圖片的頂部的清晰文字?
- 2. ImageView頂部覆蓋
- 3. CSS中心div覆蓋覆蓋頂部
- 4. UINavigationbar覆蓋視圖頂部
- 5. 覆蓋對象
- 6. 覆蓋javascript文件對象
- 7. SaveFileDialog覆蓋提示不在頂部
- 8. 在另一個頂部覆蓋圖像
- 9. 在JavaScript元素頂部覆蓋div
- 10. 覆蓋在MPMoviePlauerViewController頂部的問題
- 11. 在contourf圖頂部覆蓋輪廓線
- 12. 在C++中覆蓋對象
- 13. GWT內部JSON對象的Java覆蓋
- 14. 覆蓋空對象
- 15. JavaFX覆蓋對象
- 16. ArrayList,對象覆蓋
- 17. 覆蓋讓對象?
- 18. 覆蓋對象是
- 19. 是否可以在Open Street Map中的幾何對象頂部覆蓋圖標?
- 20. 覆蓋UIView頂部的動畫
- 21. 覆蓋滑塊頂部的圖像
- 22. 控制檯覆蓋像頂部
- 23. JFreeChart頂部的覆蓋按鈕
- 24. 覆蓋gridview頂部的圖像視圖
- 25. 相機屏幕頂部的覆蓋圖
- 26. 覆蓋文字?
- 27. 字典覆蓋/刪除對象
- 28. 在圖像頂部的響應文本覆蓋
- 29. 合併對象覆蓋內部對象不合並
- 30. Javascript:對象上下文被覆蓋?