float : The clear Property(clear 속성)
The clear Property(clear 속성)
이 clear속성은 부동 요소의 동작을 제어하는 데 사용됩니다.
떠 다니는 요소 뒤에있는 요소는 그 주위로 흐를 것입니다. 이를 피하려면 clear속성을 사용하십시오 .
이 clear속성은 요소의 어느면에 부동 요소가 뜨도록 허용되지 않는지 지정합니다.
Example
div {
clear: left;
}
<!DOCTYPE html>
<html>
<head>
<style>
.div1 {
float: left;
width: 100px;
height: 50px;
margin: 10px;
border: 3px solid #73AD21;
}
.div2 {
border: 1px solid red;
}
.div3 {
float: left;
width: 100px;
height: 50px;
margin: 10px;
border: 3px solid #73AD21;
}
.div4 {
border: 1px solid red;
clear: left;
}
</style>
</head>
<body>
<h2>Without clear</h2>
<div class="div1">div1</div>
<div class="div2">div2 - Notice that the div2 element is after div1, in the HTML code. However, since div1 is floated to the left, this happens: the text in div2 is floated around div1, and div2 surrounds the whole thing.</div>
<h2>Using clear</h2>
<div class="div3">div3</div>
<div class="div4">div4 - Using clear moves div4 down below the floated div3. The value "left" clears elements floated to the left. You can also clear "right" and "both".</div>
</body>
</html>

게시판 목록
퍼블리셔팁
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 707 | CSS | 12년 전 | 12402 | ||
| 706 | 기타 | 12년 전 | 5092 | ||
| 705 | CSS | 12년 전 | 5666 | ||
| 704 | 기타 | 12년 전 | 12105 | ||
| 703 | 웹접근성 | 12년 전 | 10087 | ||
| 702 | 기타 | 12년 전 | 5146 | ||
| 701 | CSS | 12년 전 | 3112 | ||
| 700 | 반응형 |
kiplayer
|
12년 전 | 6803 | |
| 699 | CSS |
kiplayer
|
12년 전 | 6426 | |
| 698 | 웹접근성 |
|
12년 전 | 36930 | |
| 697 | HTML | 12년 전 | 4343 | ||
| 696 | HTML | 12년 전 | 8076 | ||
| 695 | CSS | 12년 전 | 5451 | ||
| 694 | HTML | 12년 전 | 5815 | ||
| 693 | CSS | 12년 전 | 3884 | ||
| 692 | 웹접근성 |
프로프리랜서
|
12년 전 | 3775 | |
| 691 | 웹접근성 |
|
12년 전 | 12461 | |
| 690 | CSS | 12년 전 | 4216 | ||
| 689 | 웹접근성 | 12년 전 | 5873 | ||
| 688 | CSS | 12년 전 | 4925 | ||
| 687 | HTML | 12년 전 | 7386 | ||
| 686 | CSS | 13년 전 | 5837 | ||
| 685 | 기타 | 13년 전 | 10609 | ||
| 684 | HTML |
후라보노보노
|
13년 전 | 4805 | |
| 683 | HTML | 13년 전 | 4339 | ||
| 682 | 기타 |
|
13년 전 | 3517 | |
| 681 | CSS | 13년 전 | 3662 | ||
| 680 | HTML | 13년 전 | 6305 | ||
| 679 | 반응형 | 13년 전 | 6588 | ||
| 678 | CSS | 13년 전 | 3813 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기