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. CSS中心div覆蓋覆蓋頂部
- 3. 覆蓋javascript文件對象
- 4. SaveFileDialog覆蓋提示不在頂部
- 5. 在另一個頂部覆蓋圖像
- 6. JavaFX覆蓋對象
- 7. ArrayList,對象覆蓋
- 8. 是否可以在Open Street Map中的幾何對象頂部覆蓋圖標?
- 9. 覆蓋UIView頂部的動畫
- 10. JFreeChart頂部的覆蓋按鈕
- 11. 控制檯覆蓋像頂部
- 12. 覆蓋文字?
- 13. 在圖像頂部的響應文本覆蓋
- 14. 合併對象覆蓋內部對象不合並
- 15. javascript中覆蓋對象值
- 16. CoreData編輯/覆蓋對象
- 17. 覆蓋注入對象
- 18. 用對象覆蓋方法
- 19. 在html中對齊文字頂部?
- 20. CSS幫助覆蓋底部的頂部部分
- 21. 數據被覆蓋在對象上
- 22. JavaScript中的對象覆蓋鍵值對
- 23. 的EditText具有頂部/底部layou_margin已經覆蓋了softinput
- 24. 使用Python Imaging Library在圖像頂部覆蓋彩色像素
- 25. 在圖像頂部覆蓋彈出窗口
- 26. 通過點擊一個png覆蓋在Flash播放器頂部
- 27. iOS:在EAGLView/GLKView頂部創建覆蓋圖
- 28. 覆蓋在Windows XP中的視頻頂部
- 29. 覆蓋固定在div頂部並保持位置頁滾動
- 30. 在Leaflet頂部添加遮罩覆蓋v0.8-dev