核心提示:相对定位绝对定位两张图片完全重叠的处理方法之背景图#p1{width:200px;height:200px;margin:100px auto;border:1px solid #404040;pos...
相对定位绝对定位两张图片完全重叠的处理方法之背景图
#p1{ width:200px; height:200px; margin:100px auto; border:1px solid #404040; position:relative; } #tu1{ width:200px; height:200px; background:url("t1.gif"); position:absolute; top:0%; left:0%; } #tu2{ width:200px; height:200px; background:url("t2.gif"); position:absolute; top:0%; left:0%; } </style> </head> <body> <p id="p1"> <p id="tu1"></p> <p id="tu2"></p> </p>
