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에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 47 | HTML |
|
19년 전 | 4543 | |
| 46 | HTML |
|
19년 전 | 5406 | |
| 45 | HTML | 19년 전 | 3296 | ||
| 44 | HTML |
|
19년 전 | 4378 | |
| 43 | HTML | 19년 전 | 3792 | ||
| 42 | HTML |
|
19년 전 | 3770 | |
| 41 | HTML |
|
19년 전 | 4268 | |
| 40 | HTML |
세은아빠2
|
19년 전 | 3932 | |
| 39 | HTML | 19년 전 | 4283 | ||
| 38 | HTML |
|
20년 전 | 6042 | |
| 37 | HTML |
yesmoa
|
20년 전 | 6720 | |
| 36 | HTML | 20년 전 | 3829 | ||
| 35 | HTML | 20년 전 | 5033 | ||
| 34 | HTML | 20년 전 | 4506 | ||
| 33 | HTML | 20년 전 | 3737 | ||
| 32 | HTML | 20년 전 | 3827 | ||
| 31 | HTML | 20년 전 | 4582 | ||
| 30 | HTML |
|
20년 전 | 6664 | |
| 29 | HTML |
|
20년 전 | 8600 | |
| 28 | HTML | 20년 전 | 7231 | ||
| 27 | HTML | 20년 전 | 4087 | ||
| 26 | HTML | 20년 전 | 2568 | ||
| 25 | HTML | 20년 전 | 3075 | ||
| 24 | HTML | 20년 전 | 6833 | ||
| 23 | HTML | 21년 전 | 4902 | ||
| 22 | HTML | 21년 전 | 4840 | ||
| 21 | HTML | 21년 전 | 3694 | ||
| 20 | HTML | 21년 전 | 4830 | ||
| 19 | HTML | 21년 전 | 4721 | ||
| 18 | HTML |
prosper
|
21년 전 | 3561 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기