Iframes are only used as a last resort, because using iframes will cause more problems, and some browsers can be set to block iframes as ads.
I used iframe in a recent work content. The problem I encountered at first was that the iframe was highly adaptive. I found a solution to this problem in the blog of Ued team of Koubei.com. Later, I also encountered a problem of transparent iframe
. Usually the bottom of iframe is The color will be white, and there may be different colors in different browsers.
If the main page has an overall background color or background image,
a white block will appear in the iframe area, which is not coordinated with the main page, which requires the iframe to be transparent.
I found the solution by searching google for iframe transparency
<iframe src="./ads_top_tian.html" allowtransparency="true" style="background-color=transparent" title="test" frameborder="0" width="470" height ="308" scrolling="no"></iframe>Of course, the premise is that the color is not set in the iframe page.