![](/img/trans.png)
[英]the Iframe css style is not working on the Iphone, how to fix this?
[英]How to style facebook iframe with css?
我有一個包含facebook iframe的彈出窗口,它似乎無法使用內聯樣式表方法
<div data-html="allow" >
<iframe style="border: 0px; display: block" height="400" class="spoooky-auth" src="https://api.spooo.ky/auth/facebook" border="0"></iframe>
</div>
我正在嘗試增加iframe的寬度和高度,但不起作用。有任何提示嗎?
任何幫助表示贊賞。 謝謝,
我將為此使用JS ,如下所示:
<div data-html="allow" >
<iframe id="iframe1" style="border: 0px; display: block" height="400" class="spoooky-auth" src="https://api.spooo.ky/auth/facebook" border="0"></iframe>
</div>
<script type="application/javascript">
function resizeIframe {
iframe.width = iframe.contentWindow.document.body.scrollWidth;
iframe.height = iframe.contentWindow.document.body.scrollHeight;
}
window.addEventListener('DOMContentLoaded', function(e) {
var iframe = document.getElementById( 'iframe1' );
resizeIframe;
} );
</script>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.