本来应该是两个段落的内容可以横向排列在容器中。主要依靠display: flex;来实现。示例如下:
<!DOCTYPE HTML>
<html>
<head>
<style>
.container {
border: solid 2px #806868;
display: flex;
height: 100px;
}
.item {
border: 2px solid #457081;
margin: 10px;
}
</style>
</head>
<body>
<div class="container">
<p class="item">第一段</p>
<p class="item">第二段</p>
</div>
</body>
</html>
展开/折叠结果
第一段
第二段
发表评论