<!doctype html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> .div1{ height:100px; background: green; } .div2{ height: 100px; width: 100px; float: left; background-color: red; } </style> </head> <body> <div> <div>1</div> <div>2</div> </div> </body> </html>
div2在div1下面
<body> <div> <div>1</div> <div>2</div> </div> </body>
div2在div1上面
<body> <div class="wrap"> <div class="div2">2</div> <div class="div1">1</div> </div> </body>
为什么body中,颠倒了div的顺序结果会不同?
cnyballk
慕的地6079101
脑袋空空空想家
一诺yinol
相关分类