我有一个iframe全屏,如何在iframe上创建一个div?我正在尝试做类似Netflix播放器的东西,只是更静态没有javascript因此有iframe,然后有一些div在php中有一些按钮和功能,但div有一个背景切割,在iframe之上。它可行吗? LIKE THIS IMAGE CHECK PLS
这是一个可能的解决方案:
<div class="iframe_container">
<iframe width="100%" height="700px"></iframe>
<div class="custom_functions"></div>
</div>
<style type="text/css">
div.iframe_container {position: relative; width: 100%; height: 700px; background-color: #F0F;}
div.custom_functions {position: absolute; bottom: 20px; left: 20px; right: 20px; z-index: 1; background-color: #FF0; height: 200px;}
</style>
根据需要更新值,使其符合您的需求