【.net web】iframe小問題的解決

scrolling大意

scrolling爲計算機術語,是個網頁標籤,術語HTML標籤。是滾動條屬性。有兩個屬性值,一個爲yes,一個爲no。html

scrolling屬性

scrolling= 「no」意爲滾動條不隨內容改變而出現,應該把iframe的滾動條去掉,可是這樣作又會帶來一個問題,多餘的內容會被自動隱藏!spa

scrolling ="yes"意爲能夠動態隨着內容的多少而改變了,這時會出現滾動條。可是若是iframe控件位於屏幕右邊,若是網頁的高度又很高的話,就會出現兩個滾動條,一個是Iframe自已的,一個是屏幕的,這樣很不友好!code

基本解決方案

這種問題的解決方案:htm

以下iframe

<iframe frameborder="0" src ="main.aspx" scrolling ="no" name="main" width="690px" ></iframe>

在main.aspx頁中的class

<body onload="parent.document.all.main.style.height=window.document.body.scrollHeight">
相關文章
相關標籤/搜索