碼上快樂
1秒登錄
首頁
榜單
標簽
關於
搜索
相關內容
簡體
繁體
和<frame>區別</a></h3> </center> <div class="postinfo"> 本文轉載自 <i class="icon-globe"></i> <a href="/go/aHR0cHM6Ly93d3cuY25ibG9ncy5jb20vYWh1ZHlhbi1mb3JldmVyL3AvNTcwNjg3My5odG1s" target="_blank">查看原文</a> <i class="icon-time"></i> <span>2016-07-26 11:33</span> <i class="icon-eye-open"></i> <span>28378 </span> <i class="icon-tag"></i> <span><a href='/tag/html_js_css' target="_blank">html_js_css</a></span> <i class="icon-star" title="19.3175"></i> <i class="icon-star" title="19.3175"></i> <i class="icon-star" title="19.3175"></i> <i class="icon-star" title="19.3175"></i> <i class="icon-star" title="19.3175"></i> </div> <hr/> <div class="media-body" id="content_div"> <div class="title_down_ad ad"> </div> <div class="post_content" id="postContent"> <p> </p> <p><span style="font-size: 14pt;">1、frame不能脫離frameSet單獨使用,iframe可以</span></p> <p><span style="font-size: 14pt;">2、frame不能放在body中,否則不能正常顯示</span></p> <p><span style="font-size: 14pt;"> <strong>frame不能和body同時使用 </strong></span></p> <pre><span style="font-size: 14pt;"><!--<body>--> </span><br><span style="font-size: 14pt;"><frameset rows="50%,*"></span><br><span style="font-size: 14pt;"> <frame name="frame1" src="test1.htm"/></span><br><span style="font-size: 14pt;"> <frame name="frame2" src="test2.htm"/></span><br><span style="font-size: 14pt;"></frameset></span><br><span style="font-size: 14pt;"><!--</body>--> <br><strong>iframe可以和body同時使用</strong></span><br><span style="font-size: 14pt;"><body> </span><br><span style="font-size: 14pt;"><frameset></span><br><span style="font-size: 14pt;"> <iframe height="30%"name="frame1" src="test1.htm"/></span><br><span style="font-size: 14pt;"> <iframe height="100"name="frame2" src="test2.htm"/></span><br><span style="font-size: 14pt;"></frameset></span><br><span style="font-size: 14pt;"></body></span></pre> <p><span style="font-size: 14pt;">3、嵌套在frameSet中的iframe必需放在body中,不嵌套在frameSet中的iframe可以隨意使用</span></p> <p><span style="font-size: 14pt;">4、frame的高度只能通過frameSet控制;iframe可以自己控制,不能通過frameSet控制</span></p> <pre></pre> <p><span style="font-size: 14pt; font-family: 宋體;">區別:</span></p> <p><span style="font-size: 14pt;"><span style="font-family: 宋體;"> frame是整個頁面的框架,iframe是內嵌的網頁元素,也可以說是內嵌的框架,</span><span style="font-family: 宋體;">可以用它將一個HTML文檔嵌入在另一個HTML中顯示。</span></span></p> <ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4353345653789615" data-ad-slot="4890554435"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({});</script> <p><span style="font-size: 14pt;"><span style="font-family: 宋體;">最大區別是網頁中嵌入<Iframe>包含的內容與整個頁面是一個整體,</span><span style="font-family: 宋體;">而<Frame>包含的內容是獨立的個體,是可以獨立顯示的。</span></span></p> <p><span style="font-size: 14pt; font-family: 宋體;">另外,Iframe還可以在頁面中多次顯示同一內容,而不必重復這段內容的代碼。</span></p> <p><span style="font-size: 14pt;">5、 iframe 可以放到表格里面。frame 則不行。</span></p> <p><span style="font-size: 14pt;"> <table> </span></p> <p><span style="font-size: 14pt;"> <tr> </span></p> <p><span style="font-size: 14pt;"> <td><iframe id="" src=""></iframe></td><td></td> </span></p> <p><span style="font-size: 14pt;"> </tr> </span></p> <p><span style="font-size: 14pt;"> </table> </span></p> <p><span style="font-size: 14pt;">6、iframe是活動幀, 而frame是非活動幀 </span></p> <p><span style="font-size: 14pt;"> iframe用起來更靈活,不需要frame那么多講究,而且放的位置也可以自己設。</span></p> <p><span style="font-size: 14pt;"> iframe是內嵌的,比較靈活,不過也有不好的地方,就是位置在不同的瀏覽器和分辨率下有可能不同,有時會把本來好好的頁面搞得變形。</span></p> <ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4353345653789615" data-ad-slot="4890554435"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({});</script> <p><span style="font-size: 14pt;"> iframe是一個網頁中的子框架,兩網頁間是父子關系,</span></p> <p><span style="font-size: 14pt;"> iframe是一個浮動的框架,就是在你的頁面里再加上一個頁面。</span></p> <p><span style="font-size: 14pt;"> frame用來把頁面橫着或豎着切開,<iframe>用來在頁面中插入一個矩形的小窗口。</span></p> <p><span style="font-size: 14pt;"> frame是把網頁分成多個頁面的頁面。它要有一個框架集頁面frameset。</span></p> </div> <div class="read-more" id="read-more" style="display:none"></div> <div class="alert alert-info" style="margin-top:20px;"> <p id="tips_top1"> </p> </div> <script type="text/javascript"> $("#tips_top1").append("<strong><i class=\"icon-fire\"></i>溫馨提示:</strong>如果本文未解決您的問題,可以免費向大模型提問:<strong><a href='javascript:void(0)' class='gptbtn'>向AI大模型提問</a></strong>。"); </script> <div class="iframe-container"> </div> </div> <div class="ad_content_down ad"> </div> </div> <div class="disclaimer visible-desktop"> <br/> <div class="alert alert-block"> <button type="button" class="close" data-dismiss="alert">×</button> <h4>免責聲明!</h4> <p>本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。</p> </div> <br/><br/> </div> </div> <!-- 右邊相關博客和資料 --> <div class="span4 left_content"> <div id="left_list_div" class="left_content"> <span class="list-group-item" href="javascript:void(0)"><i class="icon-filter"></i><strong>猜您在找</strong></span> <a class='list-group-item' href="/blog/aa51eb1.html" title="frame與iframe的區別及基本用法"> <i class="icon-file"></i> frame與iframe的區別及基本用法 </a> <a class='list-group-item' href="/blog/abd4be1.html" title="詳解iframe與frame的區別"> <i class="icon-file"></i> 詳解iframe與frame的區別 </a> <a class='list-group-item' href="/blog/6c0ec41.html" title="frame與iframe的區別及基本用法"> <i class="icon-fire"></i> frame與iframe的區別及基本用法 </a> <a class='list-group-item' href="/blog/9484cc1.html" title="<iframe>和<frame>區別"> <i class="icon-file"></i> <iframe>和<frame>區別 </a> <a class='list-group-item' href="/blog/5e25841.html" title="【HTML】 frame和iframe的區別"> <i class="icon-file"></i> 【HTML】 frame和iframe的區別 </a> <a class='list-group-item' href="/blog/ae5d551.html" title="iframe/frameset/frame的區別"> <i class="icon-file"></i> iframe/frameset/frame的區別 </a> <a class='list-group-item' href="/blog/5da1e81.html" title="使用iframe的優缺點,為什么少用iframe以及iframe和frame的區別。"> <i class="icon-fire"></i> 使用iframe的優缺點,為什么少用iframe以及iframe和frame的區別。 </a> <a class='list-group-item' href="/blog/4e31101.html" title="html/css基礎篇——iframe和frame的區別【轉】"> <i class="icon-file"></i> html/css基礎篇——iframe和frame的區別【轉】 </a> <a class='list-group-item' href="/blog/404c391.html" title="jQuery操作Frame(iFrame)"> <i class="icon-fire"></i> jQuery操作Frame(iFrame) </a> <a class='list-group-item' href="/blog/9e6a501.html" title="selenium切換frame(iframe)"> <i class="icon-file"></i> selenium切換frame(iframe) </a> <div id="right_float_ad" class="ad"> </div> </div> </div> </div> </div> <div class="clear"> </div> <div class="fbar" style="z-index:100"> <div class="span7" style="color:grey;font-size:12px;"> </div> <div class="pull-right"> <span><a href="http://beian.miit.gov.cn" rel="nofollow" target="_blank">粵ICP備18138465號</a> </span><span>© 2018-2025 CODEPRJ.COM </span> </div> </div> <script src="/js/code.js?version=20250528"></script> <script> function buffer(a, b, c) { var d; return function() { if (d) return; d = setTimeout(function() { a.call(this), d = undefined }, b) } } (function() { function e() { var d = document.body.scrollTop || document.documentElement.scrollTop; d > b ? (a.className = "div1 div2", c && (a.style.top = d - b + "px")) : a.className = "div1" } var a = document.getElementById("float"); if (a == undefined) return ! 1; var b = 0, c, d = a; while (d) b += d.offsetTop, d = d.offsetParent; c = window.ActiveXObject && !window.XMLHttpRequest; if (!c || !0) window.onscroll = buffer(e, 50, this) })(); </script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?c81b3b98809d882ddda9a802d3778cf4"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> </body> </html>