什么叫:“相对于其最接近的一个具有定位属性的父包含块进行绝对定位”
就是如果在绝对定位前有其他定位 还是可以执行的意思吗?可以举例吗?
什么叫:“相对于其最接近的一个具有定位属性的父包含块进行绝对定位”
就是如果在绝对定位前有其他定位 还是可以执行的意思吗?可以举例吗?
2014-09-03
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>absolute样式</title> <style type="text/css"> #div1{ width:200px; height:200px; border:2px red solid; position:absolute; right:100px; top:20px; } div{ width:200px; height:200px; border:2px red solid; position:absolute; right:100px; top:20px; } </style> </head> <body> <div id="div2"> <div id="div1"> div1 </div> div2 </div> </body> </html>
举报