一个正在奋斗中的IT民工

研究+交流+分享=提高

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

Now, here is two div, one contain another one, if you set parent div filters(such as FILTER: alpha(opacity=80)、opacity: 0.8、-moz-opacity: 0.8), child div's oversteop part will be hidden, this phenomenon equal to set parent div overflow property to "hidden"(only in IE). On the other hand, child div also inherit parent filter property(IE、Firefox), obviously i didn't set any property of child div that as mentioned above, i don't this's why? If who know and had seen this article, please tell me. Thank you very much!

HTML代码:

 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2<html xmlns="http://www.w3.org/1999/xhtml">
 3<head>
 4<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
 5<title>nested div</title>
 6</head>
 7
 8<body>
 9asdfjkadfkjhwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww<br />asdfjkadfkjhwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww<br />asdfjkadfkjhwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww<br />asdfjkadfkjhwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww<br />asdfjkadfkjhwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww<br />asdfjkadfkjhwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww<br />asdfjkadfkjhwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww<br />asdfjkadfkjhwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww<br />asdfjkadfkjhwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww<br />
10asdfjkadfkjhwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww<br />
11<div style="background: #f00; width: 100%; height: 200px; position: absolute; left: 0; top: 0; border: 1px #000 solid; filter: alpha(opacity=80); opacity: 1; -moz-opacity: 0.8; z-index: 0;"><div style="background: #ccc; width: 300px; height: 300px; position: absolute; left: 150px; top: 0; border: 1px #000 solid; z-index: 1;">Now, here is two div, one contain another one, if you set parent div filters(such as FILTER: alpha(opacity=80)、opacity: 0.8、-moz-opacity: 0.8), child div's oversteop part will be hidden, this phenomenon equal to set parent div overflow property to "hidden"(only in IE). On the other hand, child div also inherit parent filter property(IE、Firefox), obviously i didn't set any property of child div that as mentioned above, i don't this's why? If who know and had seen this article, please tell me. Thank you very much!</div></div>
12</body>
13</html>
posted on 2009-06-12 13:49  kidi  阅读(216)  评论(0编辑  收藏  举报