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에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 767 |
|
9년 전 | 3975 | ||
| 766 |
kiplayer
|
9년 전 | 2894 | ||
| 765 |
|
9년 전 | 4023 | ||
| 764 | 기타 |
|
9년 전 | 4704 | |
| 763 | 기타 |
kiplayer
|
9년 전 | 9557 | |
| 762 | 기타 | 9년 전 | 9113 | ||
| 761 | 기타 | 9년 전 | 8798 | ||
| 760 | 반응형 |
|
10년 전 | 12967 | |
| 759 | 기타 | 10년 전 | 4001 | ||
| 758 | CSS |
|
10년 전 | 6012 | |
| 757 | HTML | 10년 전 | 3939 | ||
| 756 | 기타 |
|
10년 전 | 4820 | |
| 755 | CSS |
|
10년 전 | 15881 | |
| 754 | HTML |
|
10년 전 | 6142 | |
| 753 | HTML |
|
10년 전 | 4901 | |
| 752 | 기타 |
|
10년 전 | 6087 | |
| 751 | 반응형 |
|
10년 전 | 7242 | |
| 750 | HTML | 10년 전 | 7962 | ||
| 749 | HTML | 10년 전 | 7425 | ||
| 748 | 반응형 | 10년 전 | 6732 | ||
| 747 | 반응형 | 10년 전 | 12353 | ||
| 746 | 기타 | 11년 전 | 13537 | ||
| 745 | CSS |
잘살아보자
|
11년 전 | 6456 | |
| 744 | CSS |
잘살아보자
|
11년 전 | 12359 | |
| 743 | 기타 | 11년 전 | 7919 | ||
| 742 | HTML |
잘살아보자
|
11년 전 | 6587 | |
| 741 | 기타 |
잘살아보자
|
11년 전 | 6945 | |
| 740 | CSS |
잘살아보자
|
11년 전 | 6416 | |
| 739 | CSS | 11년 전 | 5747 | ||
| 738 | 기타 | 11년 전 | 3630 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기