比iframe大的背景
问题描述:
我正在构建Joomla网站。 我做了一个简单的自定义模块显示图像(800x500)。 我有另一个模块与iframe。 (它显示来自livestream.com的视频)。 我可以使用上面的图像(800x500)作为iframe的背景吗? iframe比图片小。我想把它放在上面图片的中心。我不在乎透明度。所以,有可能做到这一点吗?比iframe大的背景
答
把你的图像作为背景(div),然后把你的iframe在div?
<div style='width:180px;height:150px;background:#c33;
display:flex;justify-content:center;align-items:center'>
<div style='width:140px;height:140px;background:#3c3'>
</div>
</div>