別のドメインのiframeに含まれるページがあります。問題は、iframeが常に垂直スクロールバーで読み込まれることです。私は、マークアップをチェックし、ここで彼らはiFrameを含める方法です:HTML:iframeの高さを固定する
<iframe class="plugin-frame js-plugin-frame" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="auto" sandbox="allow-scripts allow-forms allow-same-origin allow-popups allow-top-navigation" src="https://mydomain/mypage.html"></iframe>
私は上記を変更した場合:
<iframe class="plugin-frame js-plugin-frame" frameborder="0" marginheight="0" marginwidth="0" width="100%" min-height="600px" sandbox="allow-scripts allow-forms allow-same-origin allow-popups allow-top-navigation" src="https://mydomain/mypage.html"></iframe>
それが動作します。
私のページには、動作させるために何かできることはありますか?私は、垂直スクロールバーを取り除く必要があり、サードパーティのマークアップを制御する必要はありません。これを修正するために、iframeのマークアップに必要なものはありますか?
iframeの高さをターゲットにしてウェブサイトにCSSを追加することもできます。 –
セレクタとしてiframeでcssを使用することはできませんし、min-heightを追加できますか?それはうまくいくはずです。 –
iframeのCSSを変更することはできません。iframe内のページは別のドメインにあります。 – user1640256