【发布时间】:2011-05-10 21:44:20
【问题描述】:
我想在外部网站上添加一些广告,为此,我使用 iframe:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body style="background:#ddd">
<center>My ad</center>
<iframe src="http://www.google.com" style="position:fixed; top:50px; left:0; width: 100%; bottom: 0; border: 0 ">
<p>Your browser does not support iframes.</p>
</iframe>
</body>
</html>
iframe 位于正确的位置,但“底部:0”不起作用:为什么? 我希望 iFrame 跟随窗口大小调整:如何进行?
【问题讨论】: