CSS3 background-clip 속성
CSS3 background-clip 속성
CSS3 background-clip속성은 배경의 그림 영역을 지정합니다.
이 속성에는 세 가지 값이 사용됩니다.
1. border-box - (기본값) 배경이 테두리의 바깥 가장자리에 칠해집니다.
2. padding-box - 배경이 채우기 바깥 쪽 가장자리에 칠해집니다.
3. content-box - 배경이 내용 상자 안에 그려진다.
다음 예제에서는이 background-clip속성을 보여줍니다 .
예
#example1 {
border: 10px dotted black;
padding: 35px;
background: yellow;
background-clip: content-box;
}
전체소스
<!DOCTYPE html>
<html>
<head>
<style>
#example1 {
border: 10px dotted black;
padding:35px;
background: yellow;
}
#example2 {
border: 10px dotted black;
padding:35px;
background: yellow;
background-clip: padding-box;
}
#example3 {
border: 10px dotted black;
padding:35px;
background: yellow;
background-clip: content-box;
}
</style>
</head>
<body>
<p>No background-clip (border-box is default):</p>
<div id="example1">
<h2>Lorem Ipsum Dolor</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
</div>
<p>background-clip: padding-box:</p>
<div id="example2">
<h2>Lorem Ipsum Dolor</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
</div>
<p>background-clip: content-box:</p>
<div id="example3">
<h2>Lorem Ipsum Dolor</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
</div>
</body>
</html>


게시판 목록
퍼블리셔팁
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 1217 | 반응형 | 3년 전 | 3105 | ||
| 1216 | 웹접근성 | 3년 전 | 2498 | ||
| 1215 | CSS | 4년 전 | 4904 | ||
| 1214 | 기타 | 4년 전 | 8363 | ||
| 1213 | CSS | 4년 전 | 3256 | ||
| 1212 | 웹접근성 | 4년 전 | 3644 | ||
| 1211 | CSS |
|
5년 전 | 4121 | |
| 1210 | 기타 | 5년 전 | 3346 | ||
| 1209 | CSS | 5년 전 | 3595 | ||
| 1208 | 기타 | 5년 전 | 3152 | ||
| 1207 | 기타 | 5년 전 | 2894 | ||
| 1206 | CSS |
moviepd
|
5년 전 | 3722 | |
| 1205 | HTML |
moviepd
|
5년 전 | 4386 | |
| 1204 | 기타 | 6년 전 | 7838 | ||
| 1203 | 웹접근성 | 6년 전 | 3014 | ||
| 1202 | 기타 | 6년 전 | 2990 | ||
| 1201 | 기타 | 6년 전 | 4327 | ||
| 1200 | 기타 | 6년 전 | 4124 | ||
| 1199 | 기타 | 6년 전 | 4135 | ||
| 1198 | 기타 | 6년 전 | 2616 | ||
| 1197 | 기타 | 6년 전 | 2687 | ||
| 1196 | 기타 | 6년 전 | 2471 | ||
| 1195 | 기타 | 6년 전 | 2460 | ||
| 1194 | 기타 | 6년 전 | 3049 | ||
| 1193 | 기타 | 6년 전 | 9237 | ||
| 1192 | 기타 | 6년 전 | 3886 | ||
| 1191 | 기타 | 6년 전 | 6226 | ||
| 1190 | 기타 | 6년 전 | 2444 | ||
| 1189 | 기타 | 6년 전 | 2347 | ||
| 1188 | 기타 | 6년 전 | 1826 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기