Transparent frameset in iframe ie white background
I'm trying to nest a frameset in an iframe and I can't get the background of the frameset to show as transparent in IE. Firefox displays correctly.
Here's the iframe:
<iframe src="frameset.html" name="myframe" width="500" height="500" frameborder="0" allowtransparency="true"></iframe>
And this is Frameset.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" conten开发者_如何学Pythont="text/html; charset=utf-8" />
<title></title>
</head>
<frameset cols="21%,*" framespacing="0" border="0" frameborder="no">
<frame name="menu" src="test.html" scrolling="no" marginwidth="0" marginheight="0" noresize="noresize" frameborder="no" style="background: transparent" allowtransparency="true">
<frame name="main" src="test.html" marginwidth="0" marginheight="0" noresize="noresize" frameborder="no" style="background: transparent" allowtransparency="true">
</frameset>
</html>
I've recently learned that IE browswers have a non-standard code for iframes: allowTransparency="true"
Put this in your iframe and set the style background to transparent and you should be fine.
Still no one has any sort of answer... except that IE is so utterly broken as a browser engine. Even today with IE8 and IE9 coming out soon. I hate IE. I wish all users would dump it for a real browser like Firefox or Opera.
精彩评论