文章詳情頁
javascript - iframe 為什么加載網頁的時候滾動條這樣顯示?
瀏覽:112日期:2022-12-30 17:09:03
問題描述
問題解答
回答1:跟iframe的大小有關,如果確定iframe的大小而非自適應內容的話,建議設定好iframe的width,height或者:
html, body, iframe { width: 100%; height: 100%;}
示例代碼:
<!DOCTYPE html><html><head> <meta charset='UTF-8'> <title>Document</title> <style>html,body,iframe{ width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;} </style></head><body> <iframe src='http://www.qq.com/' frameborder='0'></iframe></body></html>
標簽:
JavaScript
相關文章:
1. 求救一下,用新版的phpstudy,數據庫過段時間會消失是什么情況?2. php工具箱配置第二個vhost主機時不生效,報錯You don’t have permission3. php - mysql 模糊搜索問題4. [python2]local variable referenced before assignment問題5. javascript - 在 vue里面用import引入js文件,結果為undefined6. javascript - 我的站點貌似被別人克隆了, google 搜索特定文章,除了域名不一樣,其他的都一樣,如何解決?7. javascript - js setTimeout在雙重for循環中如何使用?8. php - 微信開發驗證服務器有效性9. html - 爬蟲時出現“DNS lookup failed”,打開網頁卻沒問題,這是什么情況?10. javascript - 求幫助 , ATOM不顯示界面!!!!
排行榜
