我有一个非常简单的HTML
,如下所示:
<!DOCTYPE html>
<html>
<head>
<style>
div.framework {
position: relative;
width: 500px;
height: 500px;
border: 0;
padding: 0px;
margin: 0px;
}
div.outside1 {
position: relative;
width: 20%;
height: 30px;
border: 0px;
display: inline-block;
margin: 0px;
}
</style>
</head>
<body>
<div class="framework">
<div class="outside1">DIV1</div>
<div class="outside1">DIV2</div>
<div class="outside1">DIV3</div>
<div class="outside1">DIV4</div>
<div class="outside1">DIV5</div>
</div>
</body>
</html>
我假设大的DIV
是500px
,每个孩子DIV
是20%
,所以所有的DIV
应该在同一行,
但是,当显示Chrome时,第五个DIV
在第二行。谁知道为什么吗?