iframe透明的解決辦法

來源:互聯網
上載者:User
iframe是迫不得已才使用的,因為使用iframe會帶來較多的問題,而有的瀏覽器可以設定將iframe當作廣告屏蔽。

在最近的一個工作內容中使用了iframe,開始遇到的問題是iframe高度自適應的問題,這問題在口碑網ued團隊部落格中找到瞭解決辦法,後來更遇到一個iframe透明的問題

通常 iframe底色會是白色,在不同瀏覽器下可能會有不同的顏色

如果首頁面有一個整體的背景色或者背景圖片的時候

iframe地區便會出現一個白色塊,與主體頁面不協調,這就需要iframe透明

通過google搜尋iframe透明找到瞭解決辦法 <iframe src="./ads_top_tian.html" allowtransparency="true" style="background-color=transparent" title="test" frameborder="0" width="470" height="308" scrolling="no"></iframe>當然前提是iframe頁面中沒有設定顏色


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.