CSS3 그라디언트
그래디언트 방향을보다 잘 제어하려면 미리 정의 된 방향 (아래에서 위쪽, 오른쪽에서 왼쪽, 오른쪽 아래 등) 대신 각도를 정의 할 수 있습니다.
통사론
background: linear-gradient(angle, color-stop1, color-stop2);
각도는 수평선과 그라데이션 선 사이의 각도로 지정됩니다.
다음 예제는 선형 그래디언트에서 각도를 사용하는 방법을 보여줍니다.
#grad {
background: red; /* For browsers that do not support gradients */
background: -webkit-linear-gradient(-90deg, red, yellow); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(-90deg, red, yellow); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(-90deg, red, yellow); /* For Firefox 3.6 to 15 */
background: linear-gradient(-90deg, red, yellow); /* Standard syntax */
}

여러 색상 정지 기능 사용
다음 예제에서는 여러 색상 정지가있는 선형 그라데이션 (위에서 아래로)을 보여줍니다.
예
#grad {
background: red; /* For browsers that do not support gradients */
background: -webkit-linear-gradient(red, yellow, green); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(red, yellow, green); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(red, yellow, green); /* For Firefox 3.6 to 15 */
background: linear-gradient(red, yellow, green); /* Standard syntax */
}

다음 예제에서는 무지개 색상과 일부 텍스트의 선형 그래디언트 (왼쪽에서 오른쪽으로)를 만드는 방법을 보여줍니다.
그라디언트 배경
예
#grad {
background: red; /* For browsers that do not support gradients */
/* For Safari 5.1 to 6.0 */
background: -webkit-linear-gradient(left,red,orange,yellow,green,blue,indigo,violet);
/* For Opera 11.1 to 12.0 */
background: -o-linear-gradient(left,red,orange,yellow,green,blue,indigo,violet);
/* For Fx 3.6 to 15 */
background: -moz-linear-gradient(left,red,orange,yellow,green,blue,indigo,violet);
/* Standard syntax */
background: linear-gradient(to right, red,orange,yellow,green,blue,indigo,violet);
}

게시글 목록
| 번호 | 제목 |
|---|---|
| 3293 |
기타
W3.CSS 테두리
|
| 3292 | |
| 3291 | |
| 3290 |
기타
W3.CSS 둥근 패널
|
| 3289 | |
| 3288 | |
| 3286 | |
| 3285 | |
| 3284 |
CSS
W3.CSS 패널
|
| 3282 |
기타
W3.CSS 테이블
|
| 3281 |
기타
W3.CSS 경고
|
| 3280 |
기타
W3.CSS 컨테이너
|
| 3279 | |
| 3278 |
기타
SVG <rect>
|
| 3277 |
기타
HTML의 SVG
|
| 3276 | |
| 3275 | |
| 3274 | |
| 3273 |
CSS
반응형 미디어쿼리
|
| 3272 | |
| 3271 |
웹접근성
로그인 자동완성 제외~
|
| 3270 | |
| 3269 | |
| 3268 | |
| 3267 | |
| 3266 | |
| 3265 |
CSS
CSS3 미디어 쿼리
|
| 3263 |
HTML
유튜브 댓글 입력 스타일
|
| 3262 | |
| 3261 |
CSS
플렉스 항목 속성
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기