本文主要包含z-index,ie6等相关知识,佚名 希望在学习及工作中可以帮助到您
- <!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">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="author" content="Chomo" />
- <link rel="start" href="http://www.14px.com" title="Home" />
- <title>法则五:非同辈元素,任意一者或其祖元素拥有动态定位时,同时各自向上寻找动态定位的祖元素,并分别从中拿出具备最高级别的祖元素(或其本身)进行比较。</title>
- </head>
- <style type="text/css">
- div { font:12px/1.5 arial;}
- div strong { color:#fff; background:#036; display:inline-block;}
- h3 strong { color:#f00;}
- /*--- 定义方块外形 ---*/
- .div1,
- .div2 {
- height:70px;
- width:150px;
- background:#cff;
- border:1px solid #036;
- }
- .grandDiv1,
- .grandDiv2 {
- padding:10px;
- border:1px solid #060;
- width:174px;
- background:#cf9;
- }
- .parentDiv1,
- .parentDiv2 {
- padding:10px;
- border:1px solid #f06;
- width:152px;
- background:#fcf;
- }
- /*--- 定义方块偏移位置、文字位置 ---*/
- .grandDiv2 {
- margin-top:-50px;
- margin-left:95px;
- }
- .parentDiv2 {
- margin-top:-40px;
- margin-left:85px;
- }
- &nb