<h2>부모 요소에 overflow 속성</h2>
<div class="wrap overflow">
<div class="one float">box1</div>
<div class="two float">box2</div>
</div>
.overflow{
overflow: hidden;
}
.wrap{
border: 3px solid #999;
font-size: 30px;
margin-bottom: 30px;
}
.one{
margin: 5px;
background-color: lightpink;
}
.two{
margin: 5px;
background-color: lightblue;
}
.float{
float: left;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.