您好我想讓橫幅出現在iframe播放器上。就像這樣:http://i.imgur.com/nbcSVPP.png當然有一個關閉按鈕。 我的HTML代碼是這樣的iframe播放器及其頂部的橫幅
<div id="content-embed" style="min-height: 500px;">
<iframe id="iframe-embed" width="100%" height="500px" scrolling="no" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true">
</iframe>
</div>
CSS
#content-embed {
width: 100%;
position: relative;
}
我至今嘗試過(對不起,我不是在CSS和HTML掌握)
<div id="content-embed" style="min-height: 500px;">
<iframe id="iframe-embed" width="100%" height="500px" scrolling="no" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" style="z-index: 0;">
</iframe>
<div style="z-index: 1;"><img src="/banner.jpg" /></div>
</div>
正是你嘗試過什麼,在哪裏是代碼的其餘部分(旗幟例如)? –
我試圖在iframe中設置內容嵌入div的z索引,並製作另一個帶橫幅的div。我編輯了第一篇文章。 – buli
[堆積對彼此頂部的DIV?](https://stackoverflow.com/questions/1909648/stacking-divs-on-top-of-each-other) – Makyen