在div块状元素中再添加两个div元素,这样做对吗
div{ border:2px red solid; } .1{ width:200px; height:200px; float:left; position:relative; } .4{ width:200px; height:200px; float:right; } .2{ width:100px; height:200px; position:absolute; left:0px; } .3{ width:90px; height:200px; position:absolute; right:10px; } </style> </head> <body> <div class="1"> <div class="2">2</div> <div class="3">3</div> </div> <div class="4"></div>
在Dreamwweaver中这样显示,可在360浏览器中却显示很奇怪,这样用相对定位正确吗