<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
/* 浏览器解析行内块或行内标签的时候,如果标签换行书写则会产生一个空格的距离 */
div {
display: inline-block;
width: 100px;
height: 100px;
}
.one {
background: pink;
}
.two {
background: skyblue;
}
</style>
</head>
<body>
<div class="one"></div>
<div class="two"></div>
</body>
</html>
标签:行内,浏览器,换行,标签,空格,解析
From: https://www.cnblogs.com/openmind-ink/p/16793909.html