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>

게시글 목록
| 번호 | 제목 |
|---|---|
| 3199 | |
| 3198 |
CSS
scale () 메서드
|
| 3197 |
CSS
rotate () 메서드
|
| 3196 | |
| 3195 |
CSS
CSS3 단어 속보
|
| 3194 |
CSS
CSS3 워드 래핑
|
| 3192 |
CSS
css 굵은 글씨 사용
|
| 3191 |
CSS
css 원하는 글꼴 사용하기
|
| 3190 | |
| 3189 | |
| 3188 | |
| 3187 |
CSS
CSS3 상자 그림자 속성
|
| 3186 |
CSS
CSS3 그림자 효과 다섯번째
|
| 3185 |
CSS
CSS3 그림자 효과 네번째
|
| 3184 |
CSS
CSS3 그림자 효과 세번째
|
| 3183 |
CSS
CSS3 그림자 효과 두번째
|
| 3182 |
CSS
CSS3 그림자 효과
|
| 3181 | |
| 3180 | |
| 3179 |
CSS
CSS3 그라디언트 모양 설정
|
| 3178 | |
| 3177 |
CSS
CSS3 그라디언트 두번째
|
| 3176 |
CSS
CSS3 그라디언트
|
| 3175 |
CSS
CSS3 Colors
|
| 3174 | |
| 3173 | |
| 3172 | |
| 3171 | |
| 3170 |
CSS
CSS3 배경 크기
|
| 3169 |
CSS
CSS3 다중 배경
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기