최근 수정 시각 : 2026-11-08 11:56:13

나무위키:문법 도움말/심화/CSS


#!if top = 문서명1 != null ? 문서명1 : calleeTitle != null ? (i = calleeTitle.lastIndexOf("/")) != -1 ? calleeTitle.substr(0, i) : '상위 문서' : '상위 문서'
[[파일:상위 문서 아이콘.svg|align=left&width=21.6px]] {{{#!html  }}} 상위 문서: [[]]

<tableclass=colored-row>파일:나무위키 로고 흰.svg 나무위키의 규정
'''[[나무위키:기본방침|
#!wiki class="form"
기본방침
]]''' 문서 관리 방침 · 토론 관리 방침 · 이용자 관리 방침 · 운영 관리 방침 (운영진 선출)
'''[[나무위키:편집지침|
#!wiki class="form"
편집지침
]]''' 일반 문서 · 특수 문서 · 특정 분야 (인문사회 · 과학기술 · 문화예술) · 등재 기준 · 표제어
'''[[나무위키:편집합의|
#!wiki class="form"
편집합의
]]''' 일반 문서 · 특수 문서 · 특정 분야 (인문사회 · 과학기술 · 문화예술 · 창작물 · 비디오 게임) · 등재 기준
'''[[나무위키:프로젝트|
#!wiki class="form"
프로젝트
]]''' 프로젝트 지침
파일:나무위키 로고 흰.svg 나무위키의 도움말
'''[[나무위키:FAQ|
#!wiki class="form"
FAQ
]]''' 나무위키 · 계정 · 문서 열람 · 편집 및 역사 페이지 · 이미지 업로드 · 문서 이동 · 기타 문의
'''[[나무위키:도움말|
#!wiki class="form"
도움말
]]''' 규정 · 기능 · 편집 · 문법 (심화 · 수식 · CSS · 개발) · 토론 · 설정 · 소명 · 권리침해 · 자주 하는 실수 · 문서 삭제식 이동 · 더미
파일:나무위키 로고 흰.svg 나무위키의 운영
'''
#!wiki class="form"
운영진
''' 관리자 · 중재자 · 역대 운영진 · 운영진 지원 · 운영 도움말 (관리 · 중재 · 권한) · 운영위원회 (의견 제시) · 운영회의 (시행규칙 · 안건 건의) · 운영진 임명 회의 (진행 중인 회의)
'''
#!wiki class="form"
기타
''' 접근 제한 (문서 목록) · 봇 리스트 · 투명성 보고서 · 소급 적용 규정 일람 · 공지 목록 · 규정 개정 토론 시행규칙
파일:나무위키 로고 흰.svg 나무위키의 기능
'''
#!wiki class="form"
메타 문서
''' 분류 (파일 · 템플릿) · 프로젝트 · 틀 · 보존문서 · 주요 페이지 링크 · 문서 작성 요청
'''
#!wiki class="form"
기능
''' 계정 (내 문서함) · 게시판 · 연습장 (토론) · 엔진 (업데이트) · 통계
#!style
.colored-row a {
   color: inherit !important;
}
.colored-row td {
   padding: 5px 6px;
}
.colored-row tr:nth-of-type(1) > td,
.colored-row tr:nth-of-type(3n+6) > td {
   padding: 5px 10px;
   background: light-dark(#00a495, #2d2f34);
   color: light-dark(#fff, #e0e0e0);
   font-weight: bold;
   font-size: 1.28em;
}
.form {
   display: inline;
   padding: 2px 4px;
   border-radius: 3px;
   background: light-dark(#00a495, #2d2f34);
   color: light-dark(#fff, #e0e0e0);
   font-size: .9em;
}


1. 개요2. \#!wiki 구문을 활용한 CSS 적용
2.1. 텍스트 정렬2.2. 텍스트 자간 조절2.3. 줄바꿈 기준 설정2.4. 다크 모드 대응 (light-dark 구문)2.5. 텍스트 배경 색상
2.5.1. 텍스트 배경 색상과 다른 강조 문법의 중첩
2.6. text-shadow를 사용하는 그림자 문법
2.6.1. 텍스트 그림자 및 네온 효과2.6.2. 텍스트 외곽선 효과
2.7. 셀 배경의 그라데이션 효과
2.7.1. 테이블/표 그라데이션2.7.2. 기타모양 그라데이션2.7.3. 텍스트 그라데이션 효과
2.8. 글꼴 적용2.9. 틀 관련 속성
3. \#!style 구문을 활용한 클래스 기반 전역 스타일 지정
3.1. \#!wiki class="" 구문3.2. 셀 매개변수 <class>3.3. 행 매개변수 <rowclass>3.4. 테이블 매개변수 <tableclass>
3.4.1. 테이블 테두리 효과3.4.2. 특정 배수의 행 간격으로 일정한 스타일 적용
3.5. \#!wiki onclick="" 구문
3.5.1. onclick 탭 UI
3.5.1.1. 기본으로 표시될 탭 지정
3.5.2. 다중 필터링 목록(라디오 버튼, 체크박스)
3.6. \#!wiki tag="" 구문
4. 스니펫 문서와 그 응용
4.1. 스니펫 문서의 구성4.2. 스니펫 호출과 그 응용

1. 개요

나무위키는 CSS를 통한 여러가지 시각적 디자인을 나타낼 수 있는 문법들을 지원하며 구문 내에서만 적용 가능한 wiki 구문과 전역으로 적용할 수 있는 style 구문이 있으며, 별도로 미리 저장해놓은 CSS를 여러 문서에 끌어와 일괄적으로 적용해볼 수 있는 스니펫 문서가 있습니다.

2. \#!wiki 구문을 활용한 CSS 적용

{{{#!wiki }}} 구문에서,
#!wiki class="code"
{{{style}}}
선언을 사용하여 CSS의 많은 속성을 적용시킬 수 있습니다. 다만, 후술하다시피 모든 속성과 함수를 적용하고 사용할 수 있는 것은 아닙니다. 기본 형식은 아래와 같으며 선언 다음에 개행을 생략하면 정상적으로 출력되지 않습니다.
{{{#!wiki style="속성들"
속성이 적용된 내용}}}

속성들 부분은 "속성명1: 값1; 속성명2: 값2;" 와 같은 방식으로 구성되며, 각 속성의 항목은 세미콜론(
#!wiki class="code"
{{{;}}}
)으로 끝납니다. 즉, 여러 속성끼리는
#!wiki class="code"
{{{;}}}
문자로 구분합니다. 자세한 내용에 대해서는 CSS 문서의 문법 문단을 참고하시기 바랍니다.

본 문단의 하위 항목인 '텍스트 정렬 및 자간 조절', '줄바꿈 기준 설정', '텍스트 및 셀 배경의 그라데이션 효과' 뿐 아니라, 후술되는 '이미지/동영상 삽입 관련 고급 문법', '인용문 정렬 문법', '접기 시 미관 개선용 문법'은 CSS에 존재하는 다양한 속성 중 일부을 나무위키의 필요성에 맞게 활용한 예시들입니다. 따라서 자세한 내용은 CSS에 관련된 외부 자료를 참고하시기 바랍니다.

단, {{{#!wiki }}} 문법으로 문단 문법(== 문단 ==)을 감쌀 수 없습니다. 문단 내에서 {{{#!wiki }}} 문법을 사용하시기 바랍니다.

{{{#!wiki lang="(언어 코드)"
속성이 적용된 내용}}}

추가로 lang 속성을 \#!wiki 구문에 적용할 수 있습니다. 언어 코드에는 ko(한국어), ja(일본어), zh(중국어) 등을 입력할 수 있습니다. 이와 관련한 내용은 틀:zh의 설명문서의 글꼴 지정이 필요한 이유를 참고하세요.

주의: {{{#!wiki }}} 구문은 기본적으로
#!wiki class="code"
{{{block}}}
(줄 전체를 차지하는) 요소로 취급됩니다. 줄 전체를 차지하는 것이 싫으시다면 style 선언에
#!wiki class="code"
{{{display: inline;}}}
을 추가하는 등의 방법으로 해결해야 합니다.

주의:
#!wiki class="code"
{{{<div>}}}
태그를 제외한 HTML의 다른 모든 태그, 특히
#!wiki class="code"
{{{<span>}}}
태그를 사용하는 문법은 정식 문법이 아니며 가능한 한 사용을 자제할 것이 요구됩니다. {{{#!wiki style= ...}}}로 시작하지 않고, {{{#!html ...}}}로 시작하는 모든 문법은 모두 비권장이라 보시면 됩니다. 이에 관해서는 별도 문단에서 설명합니다.

주의: 전술하였다시피, 모든 CSS 속성들이 사용 가능한 것은 아닙니다. 일부 CSS 속성 및 함수의 경우 보안 등의 문제로 인해 지원하지 않으며, 사용하려고 해도 속성이 적용되지 않습니다. 이에 대해서는 CSS 문서 내 나무위키에서 사용 가능한 속성 문단을 참고하시기 바랍니다.

주의: CSS 속성값 내용이 너무 길면 적용되지 않을 수 있으며, 특히 ','(콤마) 갯수를 13개를 초과하여 작성하면 해당 속성은 적용되지 않습니다.

2.1. 텍스트 정렬

파일:다른 뜻 아이콘.svg  
#!if 넘어옴1 != null
'''가운데 정렬'''{{{#!if 넘어옴2 == null
{{{#!if 넘어옴1[넘어옴1.length - 1] >= 0xAC00 && 넘어옴1[넘어옴1.length - 1] <= 0xD7A3
{{{#!if ((넘어옴1[넘어옴1.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴1[넘어옴1.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴1[넘어옴1.length - 1] < 0xAC00 || 넘어옴1[넘어옴1.length - 1] > 0xD7A3
은(는)}}}}}}{{{#!if 넘어옴2 != null
, ''''''{{{#!if 넘어옴3 == null
{{{#!if 넘어옴2[넘어옴2.length - 1] >= 0xAC00 && 넘어옴2[넘어옴2.length - 1] <= 0xD7A3
{{{#!if ((넘어옴2[넘어옴2.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴2[넘어옴2.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴2[넘어옴2.length - 1] < 0xAC00 || 넘어옴2[넘어옴2.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴3 != null
, ''''''{{{#!if 넘어옴4 == null
{{{#!if 넘어옴3[넘어옴3.length - 1] >= 0xAC00 && 넘어옴3[넘어옴3.length - 1] <= 0xD7A3
{{{#!if ((넘어옴3[넘어옴3.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴3[넘어옴3.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴3[넘어옴3.length - 1] < 0xAC00 || 넘어옴3[넘어옴3.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴4 != null
, ''''''{{{#!if 넘어옴5 == null
{{{#!if 넘어옴4[넘어옴4.length - 1] >= 0xAC00 && 넘어옴4[넘어옴4.length - 1] <= 0xD7A3
{{{#!if ((넘어옴4[넘어옴4.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴4[넘어옴4.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴4[넘어옴4.length - 1] < 0xAC00 || 넘어옴4[넘어옴4.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴5 != null
, ''''''{{{#!if 넘어옴6 == null
{{{#!if 넘어옴5[넘어옴5.length - 1] >= 0xAC00 && 넘어옴5[넘어옴5.length - 1] <= 0xD7A3
{{{#!if ((넘어옴5[넘어옴5.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴5[넘어옴5.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴5[넘어옴5.length - 1] < 0xAC00 || 넘어옴5[넘어옴5.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴6 != null
, ''''''{{{#!if 넘어옴7 == null
{{{#!if 넘어옴6[넘어옴6.length - 1] >= 0xAC00 && 넘어옴6[넘어옴6.length - 1] <= 0xD7A3
{{{#!if ((넘어옴6[넘어옴6.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴6[넘어옴6.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴6[넘어옴6.length - 1] < 0xAC00 || 넘어옴6[넘어옴6.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴7 != null
, ''''''{{{#!if 넘어옴8 == null
{{{#!if 넘어옴7[넘어옴7.length - 1] >= 0xAC00 && 넘어옴7[넘어옴7.length - 1] <= 0xD7A3
{{{#!if ((넘어옴7[넘어옴7.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴7[넘어옴7.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴7[넘어옴7.length - 1] < 0xAC00 || 넘어옴7[넘어옴7.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴8 != null
, ''''''{{{#!if 넘어옴9 == null
{{{#!if 넘어옴8[넘어옴8.length - 1] >= 0xAC00 && 넘어옴8[넘어옴8.length - 1] <= 0xD7A3
{{{#!if ((넘어옴8[넘어옴8.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴8[넘어옴8.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴8[넘어옴8.length - 1] < 0xAC00 || 넘어옴8[넘어옴8.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴9 != null
, ''''''{{{#!if 넘어옴10 == null
{{{#!if 넘어옴9[넘어옴9.length - 1] >= 0xAC00 && 넘어옴9[넘어옴9.length - 1] <= 0xD7A3
{{{#!if ((넘어옴9[넘어옴9.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴9[넘어옴9.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴9[넘어옴9.length - 1] < 0xAC00 || 넘어옴9[넘어옴9.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴10 != null
, ''''''{{{#!if 넘어옴10[넘어옴10.length - 1] >= 0xAC00 && 넘어옴10[넘어옴10.length - 1] <= 0xD7A3
{{{#!if ((넘어옴10[넘어옴10.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴10[넘어옴10.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴10[넘어옴10.length - 1] < 0xAC00 || 넘어옴10[넘어옴10.length - 1] > 0xD7A3
은(는)}}}}}} 여기로 연결됩니다. 
#!if 설명 == null && 리스트 == null
{{{#!if 설명1 == null
다른 뜻에 대한 내용은 아래 문서를}}}{{{#!if 설명1 != null
{{{#!html 테이블 정렬}}}에 대한 내용은 [[나무위키:문법 도움말]] 문서{{{#!if (문단1 == null) == (앵커1 == null)
를}}}{{{#!if 문단1 != null & 앵커1 == null
의 [[나무위키:문법 도움말#s-|]]번 문단을}}}{{{#!if 문단1 == null & 앵커1 != null
의 [[나무위키:문법 도움말#테이블 정렬|테이블 정렬]] 부분을}}}}}}{{{#!if 설명2 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단2 == null) == (앵커2 == null)
를}}}{{{#!if 문단2 != null & 앵커2 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단2 == null & 앵커2 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명3 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단3 == null) == (앵커3 == null)
를}}}{{{#!if 문단3 != null & 앵커3 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단3 == null & 앵커3 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명4 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단4 == null) == (앵커4 == null)
를}}}{{{#!if 문단4 != null & 앵커4 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단4 == null & 앵커4 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명5 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단5 == null) == (앵커5 == null)
를}}}{{{#!if 문단5 != null & 앵커5 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단5 == null & 앵커5 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명6 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단6 == null) == (앵커6 == null)
를}}}{{{#!if 문단6 != null & 앵커6 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단6 == null & 앵커6 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명7 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단7 == null) == (앵커7 == null)
를}}}{{{#!if 문단7 != null & 앵커7 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단7 == null & 앵커7 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명8 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단8 == null) == (앵커8 == null)
를}}}{{{#!if 문단8 != null & 앵커8 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단8 == null & 앵커8 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명9 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단9 == null) == (앵커9 == null)
를}}}{{{#!if 문단9 != null & 앵커9 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단9 == null & 앵커9 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명10 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단10 == null) == (앵커10 == null)
를}}}{{{#!if 문단10 != null & 앵커10 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단10 == null & 앵커10 != null
의 [[#|]] 부분을}}}}}}
#!if 설명 == null
{{{#!if 리스트 != null
다른 뜻에 대한 내용은 아래 문서를}}} 참고하십시오.

#!if 리스트 != null
{{{#!if 문서명1 != null
 * {{{#!if 설명1 != null
테이블 정렬: }}}[[나무위키:문법 도움말]] {{{#!if 문단1 != null & 앵커1 == null
문서의 [[나무위키:문법 도움말#s-|]]번 문단}}}{{{#!if 문단1 == null & 앵커1 != null
문서의 [[나무위키:문법 도움말#테이블 정렬|테이블 정렬]] 부분}}}}}}{{{#!if 문서명2 != null
 * {{{#!if 설명2 != null
: }}}[[]] {{{#!if 문단2 != null & 앵커2 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단2 == null & 앵커2 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명3 != null
 * {{{#!if 설명3 != null
: }}}[[]] {{{#!if 문단3 != null & 앵커3 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단3 == null & 앵커3 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명4 != null
 * {{{#!if 설명4 != null
: }}}[[]] {{{#!if 문단4 != null & 앵커4 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단4 == null & 앵커4 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명5 != null
 * {{{#!if 설명5 != null
: }}}[[]] {{{#!if 문단5 != null & 앵커5 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단5 == null & 앵커5 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명6 != null
 * {{{#!if 설명6 != null
: }}}[[]] {{{#!if 문단6 != null & 앵커6 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단6 == null & 앵커6 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명7 != null
 * {{{#!if 설명7 != null
: }}}[[]] {{{#!if 문단7 != null & 앵커7 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단7 == null & 앵커7 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명8 != null
 * {{{#!if 설명8 != null
: }}}[[]] {{{#!if 문단8 != null & 앵커8 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단8 == null & 앵커8 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명9 != null
 * {{{#!if 설명9 != null
: }}}[[]] {{{#!if 문단9 != null & 앵커9 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단9 == null & 앵커9 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명10 != null
 * {{{#!if 설명10 != null
: }}}[[]] {{{#!if 문단10 != null & 앵커10 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단10 == null & 앵커10 != null
문서의 [[#|]] 부분}}}}}}

텍스트를 정렬할 수 있으며 형태, 크기, 색상과 병용할 수 있습니다. 기본값은 좌측 정렬입니다.
{{{#!wiki style="text-align: center"
중앙}}}
↓
중앙

{{{#!wiki style="text-align: left"
좌측}}}
↓
좌측

{{{#!wiki style="text-align: right"
우측}}}
↓
우측

2.2. 텍스트 자간 조절

{{{#!wiki style="letter-spacing: 값px"
텍스트}}}

텍스트의 자간을 조절하여 공간을 절약하거나 가독성을 향상시킬 수 있습니다. 기본값은 0px입니다.

템플릿, 틀, 테이블(표) 등에서 미관상의 목적으로만 사용하여 주십시오.
<rowcolor=#000> 입력 출력
{{{#!wiki style="letter-spacing: 1.5px"
텍스트의 자간이 1.5px입니다.}}}
텍스트의 자간이 1.5px입니다.
{{{#!wiki style="letter-spacing: 1px"
텍스트의 자간이 1px입니다.}}}
텍스트의 자간이 1px입니다.
{{{#!wiki style="letter-spacing: 0.5px"
텍스트의 자간이 0.5px입니다.}}}
텍스트의 자간이 0.5px입니다.
{{{#!wiki style="letter-spacing: 0px"
텍스트의 자간이 기본값입니다.}}}
텍스트의 자간이 기본값입니다.
{{{#!wiki style="letter-spacing: -0.5px"
텍스트의 자간이 -0.5px입니다.}}}
텍스트의 자간이 -0.5px입니다.
{{{#!wiki style="letter-spacing: -1px"
텍스트의 자간이 -1px입니다.}}}
텍스트의 자간이 -1px입니다.
{{{#!wiki style="letter-spacing: -1.5px"
텍스트의 자간이 -1.5px입니다.}}}
텍스트의 자간이 -1.5px입니다.

2.3. 줄바꿈 기준 설정

틀, 표, 인용문 박스 등 특정 영역의 가장자리에서 텍스트가 줄바꿈 될 때의 기준을 다음 문법을 통해 설정하여 가독성을 향상시킬 수 있습니다.
{{{#!wiki style="word-break: (조건값)"
(텍스트)}}}

줄바꿈 조건값으로 입력할 수 있는 값에는 다음이 있습니다.
  • {{{#!wiki class="code"
normal}}}: 띄어쓰기와 하이픈(-)을 단어 구분의 기준으로 라틴 문자(로마자)의 단어 단위 줄바꿈
  • {{{#!wiki class="code"
keep-all}}}: 띄어쓰기와 하이픈(-)을 단어 구분의 기준으로 모든 문자(한글 포함)의 단어 단위 줄바꿈
  • 표 안 텍스트의 경우 wiki style을 사용하지 않은 기본 문법인 {{{#!wiki class="code"
<keepall>}}},
#!wiki class="code"
{{{<rowkeepall>}}}
,
#!wiki class="code"
{{{<colkeepall>}}}
사용을 권장합니다.
  • {{{#!wiki class="code"
break-all}}}: 글자 단위 줄바꿈

참고: 이 문법을 따로 사용하지 않았을 경우의 나무위키 기본값은 글자 단위 줄바꿈(
#!wiki class="code"
{{{break-all}}}
) 입니다.

이 문법을 사용하여 해당 영역에서 전체적으로 단어 단위로 줄바꿈을 적용할 시, 예외적으로 일부 단어에 대해서만 단어 내 특정한 위치에서 줄바꿈을 적용하려면 그 위치에 폭 없는 공백(Zero Width Space, U+200B)을 삽입하면 됩니다. 폭 없는 공백은 그냥 복사해서 붙여넣으면 나중에 RAW에서 찾기 어려워지니 {{{#!html &ZeroWidthSpace;}}} 또는 {{{#!html &#8203;}}}과 같이 HTML을 사용한 방법이 좋습니다.

다음은 예시입니다.
<rowcolor=#000>word-break: break-all 사용 (나무위키 기본값, 글자 단위로 줄바꿈)
{{{ Out of the frying pan into the fire. 여우를 피해서 호랑이를 만나다. Saying is one thing, doing is another. 말은 쉬워도 행동은 어렵다. The fish always stinks from the head downwards. 윗물이 맑아야 아랫물이 맑다. The sparrow near a school sings the primer. 서당개 삼 년에 풍월 읊는다. The mouse that has but one hole is quickly taken. 구멍 하나 뿐인 쥐는 빨리 잡힌다. Still waters run deep. 잔잔한 물은 깊이 흐른다. What's learned in the cradle is carried to the grave. 요람에서 배워 무덤까지 간다. }}}
Out of the frying pan into the fire. 여우를 피해서 호랑이를 만나다. Saying is one thing, doing is another. 말은 쉬워도 행동은 어렵다. The fish always stinks from the head downwards. 윗물이 맑아야 아랫물이 맑다. The sparrow near a school sings the primer. 서당개 삼 년에 풍월 읊는다. The mouse that has but one hole is quickly taken. 구멍 하나 뿐인 쥐는 빨리 잡힌다. Still waters run deep. 잔잔한 물은 깊이 흐른다. What's learned in the cradle is carried to the grave. 요람에서 배워 무덤까지 간다.

<rowcolor=#000>word-break: normal 사용 (라틴 문자 단어 단위로 줄바꿈)
\{{{#!wiki style="word-break: normal"
{{{
Out of the frying pan into the fire. 여우를 피해서 호랑이를 만나다. Saying is one thing, doing is another. 말은 쉬워도 행동은 어렵다. The fish always stinks from the head downwards. 윗물이 맑아야 아랫물이 맑다. The sparrow near a school sings the primer. 서당개 삼 년에 풍월 읊는다. The mouse that has but one hole is quickly taken. 구멍 하나 뿐인 쥐는 빨리 잡힌다. Still waters run deep. 잔잔한 물은 깊이 흐른다. What's learned in the cradle is carried to the grave. 요람에서 배워 무덤까지 간다. }}}}}}

|| Out of the frying pan into the fire. 여우를 피해서 호랑이를 만나다. || Saying is one thing, doing is another. 말은 쉬워도 행동은 어렵다. || The fish always stinks from the head downwards. 윗물이 맑아야 아랫물이 맑다. || The sparrow near a school sings the primer. 서당개 삼 년에 풍월 읊는다. || The mouse that has but one hole is quickly taken. 구멍 하나 뿐인 쥐는 빨리 잡힌다. || Still waters run deep. 잔잔한 물은 깊이 흐른다. || What's learned in the cradle is carried to the grave. 요람에서 배워 무덤까지 간다. ||

<rowcolor=#000>word-break: keep-all 사용 (한글을 포함한 모든 문자의 단어 단위로 줄바꿈)
\{{{#!wiki style="word-break: keep-all"
{{{
Out of the frying pan into the fire. 여우를 피해서 호랑이를 만나다. Saying is one thing, doing is another. 말은 쉬워도 행동은 어렵다. The fish always stinks from the head downwards. 윗물이 맑아야 아랫물이 맑다. The sparrow near a school sings the primer. 서당개 삼 년에 풍월 읊는다. The mouse that has but one hole is quickly taken. 구멍 하나 뿐인 쥐는 빨리 잡힌다. Still waters run deep. 잔잔한 물은 깊이 흐른다. What's learned in the cradle is carried to the grave. 요람에서 배워 무덤까지 간다. }}}}}}

|| Out of the frying pan into the fire. 여우를 피해서 호랑이를 만나다. || Saying is one thing, doing is another. 말은 쉬워도 행동은 어렵다. || The fish always stinks from the head downwards. 윗물이 맑아야 아랫물이 맑다. || The sparrow near a school sings the primer. 서당개 삼 년에 풍월 읊는다. || The mouse that has but one hole is quickly taken. 구멍 하나 뿐인 쥐는 빨리 잡힌다. || Still waters run deep. 잔잔한 물은 깊이 흐른다. || What's learned in the cradle is carried to the grave. 요람에서 배워 무덤까지 간다. ||

2.4. 다크 모드 대응 (light-dark 구문)

주의: 기존 다크 모드 전용 선언인
#!wiki class="code"
{{{dark-style}}}
은 더 이상 권장되지 않으므로
#!wiki class="code"
{{{light-dark()}}}
CSS 함수로 값을 지정하시기 바랍니다. 참고

같은 색상 속성에서
#!wiki class="code"
{{{light-dark}}}
으로 라이트모드과 다크모드에서 나오는 색상을 light-dark(라이트모드 속성 값, 다크모드 속성 값) 식으로 다르게 설정할 수 있습니다.

다음은 예시입니다.
입력
{{{#!wiki style="color: light-dark(#00a495, orange)"
라이트모드 사용 시에는 나무위키색, 다크모드 사용 시에는 오렌지색이 됩니다.}}}
출력
라이트모드 사용 시에는 나무위키색, 다크모드 사용 시에는 오렌지색이 됩니다.

주의: dark-style(라이트모드 속성 값, 다크모드 속성 값) 사용시 라이트모드 속성 값과 다크모드 속성 값 전부를 채워야합니다. 다크모드_에서만 선언된 값이 있_다고 해서 라이트모드 속성 값을 비워두면 light-dark 구문이 동작되지 않을 수 있으며, 이 때는 라이트모드의 기본 헥스 값이라도 찾아 입력하여 채워야 합니다. 아래는 예시입니다.
입력
{{{#!wiki style="color: light-dark( , orange)"
테스트}}}
출력
테스트

2.5. 텍스트 배경 색상

{{{#!wiki style="display: inline; background: #배경색"
서술할 내용}}}


아래 표의 예시는 비교를 위하여 원본과 3배본을 함께 서술하였습니다.
{{{#!wiki style="display: inline; background: #999"
배경색 적용}}}

글자가 있는 부분(공백 포함)에만 배경색이 적용됩니다.
{{{#!wiki style="display: inline; background: #999"
배경색 적용}}}

배경색 적용
틀:글배경, 틀:글배경b, 틀:글배경r, 틀:글배경br을 이용할 수도 있습니다.

2.5.1. 텍스트 배경 색상과 다른 강조 문법의 중첩

서술할 내용1

서술할 내용2

서술할 내용3

{{{#!wiki style="display: inline; background: #배경색"
서술할 내용1}}}

{{{#!wiki style="display: inline; color: #글자색"
서술할 내용2
}}}

{{{#!wiki style="display: inline; color: #글자색; background: #배경색"
서술할 내용3}}}

2.6. text-shadow를 사용하는 그림자 문법

2.6.1. 텍스트 그림자 및 네온 효과

주의: 해당 shadow 문법중 네온 효과는 관련 편집합의에 따라 둘러보기 틀에서 사용이 불가능합니다.
네온 효과의 경우 틀:글무리를 이용하면 됩니다. 예시는 다음과 같습니다.
<rowcolor=#000> 입력 출력
[include(틀:글무리, 둘레=3, 그림자=00f, 글자=fff, 내용=여기로, 링크=나무위키)]
#!if 링크 == null
{{{#!wiki tag="span" style="text-shadow:0 0 3px 00f; text-shadow:0 0 3 00f; color:#fff; text-shadow:0 0 3px #00f; text-shadow:0 0 3 #00f; color:#fff; color:fff;"
{{{#!html 여기로}}}}}}
#!if 링크 != null
[[나무위키#|{{{#!wiki tag="span" style="text-shadow:0 0 3px 00f; text-shadow:0 0 3 00f; color:#fff; text-shadow:0 0 3px #00f; text-shadow:0 0 3 #00f; color:fff;"
{{{#!html 여기로}}}}}}]]

단, 다중 그림자 효과를 적용하는 상황처럼 부득이하게 필요한 경우 아래와 같은 문법을 이용할 수 있습니다.
#!syntax html
{{{#!wiki style="text-shadow: 가로움직임px 세로움직임px 번짐정도px #그림자색; color:#글자색"
서술할 내용}}} 

나무위키에서는 px 단위의 값이 0이 아닐 때 항상 px를 써주어야 정상 표시됩니다. 표나 이미지의 크기를 정할 때와 같이, px를 생략하면 자동으로 픽셀 단위로 맞추어 주지는 않음에 주의해야 합니다. 글자색을 그대로 쓸 생각이면 ; color:#글자색부분을 제외하면 됩니다. 아래 표의 예시는 비교를 위하여 원본과 3배본을 함께 서술하였습니다.
{{{#!wiki style="text-shadow: 3px 3px 0 #999"
그림자 효과}}}

번짐이 없으면 그림자 효과가 됩니다.
<keepall>
그림자 효과
그림자 효과
{{{#!wiki style="text-shadow: 0 0 6px #2BB; color: #066"
네온 효과}}}

번짐 옵션을 6px 주어서 네온 사인 같은 효과를 얻습니다.
네온 효과
네온 효과
{{{#!wiki style="text-shadow: 3px 3px 0 yellow, 6px 6px 9px #DA2; color: black"
다중 효과}}}

그림자 + 번진 그림자(쉼표로 다중 적용)로 큰 글씨에서 진한 네온 효과
다중 효과
다중 효과

2.6.2. 텍스트 외곽선 효과

{\{\{#!wiki style="text-shadow: 외곽선두께px 0 #외곽선색, 0 외곽선두께px #외곽선색, -외곽선두께px 0 #외곽선색, 0 -외곽선두께px #외곽선색, 외곽선두께px 외곽선두께px #외곽선색, 외곽선두께px -외곽선두께px #외곽선색, -외곽선두께px -외곽선두께px #외곽선색, -외곽선두께px 외곽선두께px #외곽선색; color:#글자색"
서술할 내용}\}\}

나무위키에서는 px 단위의 값이 0이 아닐 때 항상 px를 써주어야 정상 표시됩니다. 표나 이미지의 크기를 정할 때와 같이, px를 생략하면 자동으로 픽셀 단위로 맞추어 주지는 않음에 주의해야 합니다.
글자색을 그대로 쓸 생각이면 ; color:#글자색부분을 제외하면 됩니다. 아래 표의 예시는 비교를 위하여 원본과 3배본을 함께 서술하였습니다.

위의 그림자 효과를 응용한 방식입니다.
상, 하, 좌, 우, 좌상, 우상, 좌하, 우하의 8방으로 그림자를 모두 적용한 방식으로 외곽선처럼 표시됩니다.
이 중 상, 하, 좌, 우의 그림자 효과만 적용할 경우 픽셀 폰트처럼 외곽선이 표시됩니다.
{\{\{#!wiki style="text-shadow: 1px 0 #fff, 0 1px #fff, -1px 0 #fff, 0 -1px #fff, 1px 1px #fff, 1px -1px #fff, -1px -1px #fff, -1px 1px #fff; color: #11A048"
외곽선 효과1}\}\
}
외곽선 효과1
외곽선 효과1
{\{\{#!wiki style="text-shadow: 1px 0 #fff, 0 1px #fff, -1px 0 #fff, 0 -1px #fff; color:#11A048"
외곽선 효과2}\}\}
외곽선 효과2
외곽선 효과2
2.6.2.1. 틀:글자 테두리 사용
\[include(틀:글자 테두리, w=, s=, s_d=, c=, c_d=, t=)]
  • 인수 목록
    • w: 굵기 지정
    • s: 테두리 그림자 색상
      • s_d: 테두리 그림자 다크색상
    • c: 글자 색상 (생략 시 원본)
      • c_d: 글자 다크색상
    • t: 내용

해당 틀을 통해 간단하게 텍스트 외곽선 효과를 넣을 수 있습니다.

2.7. 셀 배경의 그라데이션 효과

{{{#!wiki style="background: linear-gradient(<to 방향>, #<헥스 코드 1>, #<헥스 코드 2>)"
}}}

이 문법은 글자의 배경에 그라데이션을 넣는 기능입니다. (텍스트 뿐만 아니라 테이블의 셀 배경으로 적용 또한 가능함) <헥스 코드 1, 2> 자리에 자신이 넣고 싶은 여섯 자리의 헥스 코드들을 찾아서 입력해 주세요.

그라데이션의 여백을 조절하고 싶다면 위 문법에 margin: (세로 여백 조절 숫자)px (가로 여백 조절 숫자)px; 을 추가로 입력하여 조절해 주세요.

그라데이션의 크기를 조절하고 싶다면 위 문법에 padding: (세로 크기 조절 숫자)px (가로 크기 조절 숫자)px; 을 추가로 입력하여 조절해 주세요.

그라데이션의 방향을 설정하고 싶다면
#!wiki class="code"
{{{<to 방향>}}}
자리에
#!wiki class="code"
{{{to left}}}
,
#!wiki class="code"
{{{to right}}}
,
#!wiki class="code"
{{{to top}}}
,
#!wiki class="code"
{{{to bottom}}}
중에서 하나를 입력해 주세요.
  • 왼쪽에서 오른쪽: {{{#!wiki class="code"
to right}}}
  • 오른쪽에서 왼쪽: {{{#!wiki class="code"
to left}}}
  • 위에서 아래: {{{#!wiki class="code"
to bottom}}}
  • 아래에서 위: {{{#!wiki class="code"
to top}}}
  • 북동쪽 방향 대각선: {{{#!wiki class="code"
to top right}}} 또는
#!wiki class="code"
{{{to right top}}}
  • 동남쪽 방향 대각선: {{{#!wiki class="code"
to bottom right}}} 또는
#!wiki class="code"
{{{to right bottom}}}
  • 남서쪽 방향 대각선: {{{#!wiki class="code"
to bottom left}}} 또는
#!wiki class="code"
{{{to left bottom}}}
  • 북서쪽 방향 대각선: {{{#!wiki class="code"
to top left}}} 또는
#!wiki class="code"
{{{to left top}}}


그라데이션의 각도를 세세하게 조절하고 싶다면
#!wiki class="code"
{{{<to 방향>}}}
대신 육십분법으로
#!wiki class="code"
{{{<숫자deg>}}}
나 호도법으로
#!wiki class="code"
{{{<숫자rad>}}}
문법을 사용해 보세요.
#!wiki class="code"
{{{숫자}}}
안의 각도를 소수점 아래로 미세한 조정이 가능합니다. 아래는 예시입니다.
  • 북쪽 방향: {{{#!wiki class="code"
0deg}}}
  • 북동쪽 방향: {{{#!wiki class="code"
45deg}}}
  • 동쪽 방향: {{{#!wiki class="code"
90deg}}}
  • 남동쪽 방향: {{{#!wiki class="code"
135deg}}}
  • 남쪽 방향: {{{#!wiki class="code"
180deg}}}
  • 남서쪽 방향: {{{#!wiki class="code"
225deg}}}
  • 서쪽 방향: {{{#!wiki class="code"
270deg}}}
  • 북서쪽 방향: {{{#!wiki class="code"
315deg}}}

상기의 문법을 동시에 사용한 예시입니다.
{{{#!wiki style="padding: 5px 10px; background: linear-gradient(to right, #FFB9B9, #FFFDBB)"
그라데이션 기능입니다.}}}

그라데이션 기능입니다.


또다른 예시입니다.

{{{#!wiki style="padding: 5px 10px; background: linear-gradient(135deg, #FFB9B9, #FFD3B6, #FFFDBB, #B4ECB4, #ACE1FF, #F6C3FF)"
그라데이션 기능입니다.

무지개색 총공격이다!}}}

그라데이션 기능입니다.


헥스 코드를 여러번 입력하여 색과 색 사이의 경계를 좀 더 뚜렷하게 만들어 다양한 시도를 할 수 있습니다.
||<width=300><nopad> {{{#!wiki style="padding: 5px 10px; background: linear-gradient(to right, #AFEEEE, #AFEEEE, #AFEEEE, #AFEEEE, #4682B4, #4682B4, #4682B4, #4682B4)"
{{{#FFFFFF '''안녕하세요'''}}}[br][br][br]{{{#FFFFFF '''여러분'''}}}}}} ||
안녕하세요
여러분

다크모드 대응 시,
#!wiki class="code"
{{{background: light-dark(라이트모드 배경 속성, 다크모드 배경 속성);}}}
과 같이 지정합니다. 예시는 다음과 같습니다. 설정을 통하여 다크모드를 적응하면 위의 예시와 다르게 보입니다.
안녕하세요
여러분

헥스 코드 바로 오른쪽에 퍼센테이지를 붙여서 각 색이 차지하는 크기 및 비율을 조절하는 방법도 있습니다.
  • linear-gradient(to right, #AFEEEE 65%, #4682B4 80%)"
    #AFEEEE로 시작하고, 왼쪽에서 65% 지점 이후부터 #4682B4로 전환되기 시작한 후, 왼쪽에서 80% 지점부터 순수한 #4682B4로 완전히 전환되어 종료되는 그라데이션
||<width=300><nopad> {{{#!wiki style="padding: 5px 10px; background: linear-gradient(to right, #AFEEEE 65%, #4682B4 80%)"
{{{#FFFFFF '''안녕하세요'''}}}[br][br][br]{{{#FFFFFF '''여러분'''}}}}}} ||
안녕하세요
여러분
  • linear-gradient(to right, #AFEEEE, #4682B4 60%, #C0D84D)"
    #AFEEEE로 시작하고, 왼쪽에서 60% 지점부터 순수한 #4682B4로 완전히 전환된 후, #C0D84D로 종료되는 그라데이션
||<width=300><nopad> {{{#!wiki style="padding: 5px 10px; background: linear-gradient(to right, #AFEEEE, #4682B4 60%, #C0D84D)"
{{{#FFFFFF '''안녕하세요'''}}}[br]{{{#FFFFFF '''여러분'''}}}}}} ||
안녕하세요
여러분

오른쪽 색상의 지정 위치가 왼쪽 색상보다 작거나 같을 경우, 그라데이션 효과가 사라지고 왼쪽 색상에 지정한 위치에서 색이 나누어집니다.
  • linear-gradient(to right, #C9151E 30%, #D1EAFF 0%)
  • linear-gradient(to right, #C9151E 58%, #D1EAFF 57%)
  • linear-gradient(to right, #C9151E 70%, #D1EAFF 70%)
  • linear-gradient(45deg, #C9151E 70%, #D1EAFF 70%)
30%
58%
70%
70%

서로 다른 방향의 그라데이션을 한 표안에 원할시 linear-gradient(<to 방향>, #<헥스 코드 1>, #<헥스 코드 2>)를 중첩으로 사용해 만들 수 있습니다.
||<width=300><nopad> {{{#!wiki style="padding: 5px 10px; background: linear-gradient(to right, #355c7d, #6c5b7b, transparent 50%), linear-gradient(to top, #f8b195, #f67280, #f64d5f)"
{{{#fff '''중첩된'''}}}[br]{{{#fff '''그라데이션'''}}}}}} ||
중첩된
그라데이션
퍼센테이지를 적용할 수도 있습니다.
||<width=300><nopad> {{{#!wiki style="padding: 5px 10px; background: linear-gradient(to right, #355c7d 25%, #6c5b7b 25%, #6c5b7b 50%, transparent 50%), linear-gradient(to top, #f8b195 33%, #f67280 33% 66%, #f64d5f 66%)"
{{{#fff '''중첩된'''}}}[br]{{{#fff '''그라데이션'''}}}}}} ||
중첩된
그라데이션

반복되는 그라데이션을 원할시 linear-gradient앞에 repeating-을 붙여 구현할 수 있습니다.
||<width=300><nopad> {{{#!wiki style="padding: 5px 10px; background: repeating-linear-gradient(45deg, #1f719a 6% 12%, #2abdc3 12% 18%, #fff6ee 18% 24%)"
{{{#0e284c '''반복 그라데이션'''}}}}}} ||
반복 그라데이션
반복 그라데이션
반복 그라데이션

rgba(R, G, B, A) 등 투명도를 지정하면 그라데이션끼리 중첩도 가능합니다.
||<width=300><nopad> {{{#!wiki style="padding: 6px 0; background-color: hsl(34, 53%, 82%); background: linear-gradient(0deg, rgba(255, 255, 255, 0.875), rgba(255, 255, 255, 0.875)), repeating-linear-gradient(45deg, transparent 5px, hsla(197, 62%, 11%, 0.5) 5px, hsla(197, 62%, 11%, 0.5) 10px, hsla(5, 53%, 63%, 0) 10px, hsla(5, 53%, 63%, 0) 35px, hsla(5, 53%, 63%, 0.5) 35px, hsla(5, 53%, 63%, 0.5) 40px, hsla(197, 62%, 11%, 0.5) 40px, hsla(197, 62%, 11%, 0.5) 50px, hsla(197, 62%, 11%, 0) 50px, hsla(197, 62%, 11%, 0) 60px, hsla(5, 53%, 63%, 0.5) 60px, hsla(5, 53%, 63%, 0.5) 70px, hsla(35, 91%, 65%, 0.5) 70px, hsla(35, 91%, 65%, 0.5) 80px, hsla(35, 91%, 65%, 0) 80px, hsla(35, 91%, 65%, 0) 90px, hsla(5, 53%, 63%, 0.5) 90px, hsla(5, 53%, 63%, 0.5) 110px, hsla(5, 53%, 63%, 0) 110px, hsla(5, 53%, 63%, 0) 120px, hsla(197, 62%, 11%, 0.5) 120px, hsla(197, 62%, 11%, 0.5) 140px), repeating-linear-gradient(135deg, transparent 5px, hsla(197, 62%, 11%, 0.5) 5px, hsla(197, 62%, 11%, 0.5) 10px, hsla(5, 53%, 63%, 0) 10px, hsla(5, 53%, 63%, 0) 35px, hsla(5, 53%, 63%, 0.5) 35px, hsla(5, 53%, 63%, 0.5) 40px, hsla(197, 62%, 11%, 0.5) 40px, hsla(197, 62%, 11%, 0.5) 50px, hsla(197, 62%, 11%, 0) 50px, hsla(197, 62%, 11%, 0) 60px, hsla(5, 53%, 63%, 0.5) 60px, hsla(5, 53%, 63%, 0.5) 70px, hsla(35, 91%, 65%, 0.5) 70px, hsla(35, 91%, 65%, 0.5) 80px, hsla(35, 91%, 65%, 0) 80px, hsla(35, 91%, 65%, 0) 90px, hsla(5, 53%, 63%, 0.5) 90px, hsla(5, 53%, 63%, 0.5) 110px, hsla(5, 53%, 63%, 0) 110px, hsla(5, 53%, 63%, 0) 140px, hsla(197, 62%, 11%, 0.5) 140px, hsla(197, 62%, 11%, 0.5) 160px )"
투명도 그라데이션}}} ||
투명도 그라데이션

2.7.1. 테이블/표 그라데이션

표 문법 안에 넣어서 활용하는 방법도 있습니다.
||<width=300><nopad> {{{#!wiki style="padding: 5px 10px; background: linear-gradient(to right, #00a495, #13ad65)"
{{{#fff,#fff '''나무위키'''}}}[br]{{{#fff,#fff '''고유 컬러'''}}}}}} ||
나무위키
고유 컬러
그라데이션 위키스타일 앞에 <nopad>를 넣으시면 셀에 꽉 차는 그라데이션을 넣으실 수 있습니다.
  • 테이블 전체 배경색을 그라데이션으로 지정하는 방법입니다.
||<tablealign=(정렬 위치)><tablewidth=(테이블 너비)><tablebgcolor=transparent><tablebordercolor=transparent><nopad>{{{#!wiki style="overflow: hidden; border: 2px solid #<외곽선 핵스코드 색>; background: linear-gradient(<방향>, #<헥스코드 1>, #<헥스코드 2>);"
{{{#!wiki style="margin: -12px -2px"
||<-2><tablewidth=100%><tablebgcolor=transparent><tablebordercolor=transparent><tablecolor=#fff,#fff> '''표 안의 내용''' ||
||<width=50%> 1 || 2 ||
|| 3 || 4 ||}}}}}}||
{{{#!wiki style="overflow: hidden; border: 2px solid #555; background: linear-gradient(to right, #ffb9b9, #fffdbb);"
{{{#!wiki style="margin: -12px -2px"
<tablewidth=100%><tablebgcolor=transparent><tablebordercolor=transparent> 표 안의 내용
1 2
3 4 }}}}}}
위키스타일 문법에서 배경색을 그라데이션으로 넣어주고 테이블에서 <tablebgcolor=transparent> 선언을 하여 문법상으론 테이블 자체는 투명하게 해 위키스타일로 지정한 배경 그라데이션이 보이게 하는 원리입니다.
출처: #

특정 셀에만 그라데이션이 보이게 하고 싶다면 그라데이션이 적용되지 않는 것을 원하는 셀에 배경색을 지정해주시면 됩니다.

예시
{{{#!wiki style="overflow: hidden; border: 2px solid #555; background: linear-gradient(to right, #ffb9b9, #fffdbb);"
{{{#!wiki style="margin: -12px -2px"
<tablewidth=100%><tablebgcolor=transparent><tablebordercolor=transparent> 표 안의 내용
<colbgcolor=#333,#333><colcolor=#fff,#fff> 1 2
3 4 }}}}}}
||<tablealign=(정렬 위치)><tablewidth=(테이블 너비)><tablebgcolor=transparent><tablebordercolor=transparent><nopad>{{{#!wiki style="overflow: hidden; border: 2px solid #<외곽선 헥스코드 색>; background: linear-gradient(<방향>, #<헥스코드 1>, #<헥스코드 2>);"
{{{#!wiki style="margin: -12px -2px"
||<-2><tablewidth=100%><tablebgcolor=transparent><tablebordercolor=transparent><tablecolor=#fff,#fff> '''표 안의 내용''' ||
||<width=50%><bgcolor=#<그라데이션 없는 셀 헥스코드><color=#<글자색 헥스코드> 1 || 2 ||
|| 3 || 4 ||}}}}}}||

2.7.2. 기타모양 그라데이션

원 모양의 그라데이션을 원할시 다음과 같이 입력해 출력할 수 있습니다.
{{{#!wiki style="background: radial-gradient(circle at (위치)% (높이)%, #<헥스 코드 1>, #<헥스 코드 2>)"}}}
  • 위치: 0%일시 원의 중심이 최좌측, 100%일시 원의 중심이 최우측
  • 높이: 0%일시 원의 중심이 최상단, 100%일시 원의 중심이 최하단
예시

위치 50%
높이 50%
크기 50%



위치 0%
높이 50%
크기 50%



위치 50%
높이 0%
크기 50%


마찬가지로 위의 linear-gradient와 혼용하여 사용가능합니다.
||<width=300><nopad> {{{#!wiki style="padding: 5px 10px; background: radial-gradient(circle at 50% 0%, #000 30%, transparent 30%), linear-gradient(to top, #000, #808080)"
[br]'''{{{#fff 위치 50%[br]높이 0%[br]크기 30%}}}'''[br][br]}}} || 

위치 50%
높이 0%
크기 30%



코닉(극좌표) 그라데이션을 사용하면 파이 모양 그래프를 만들 수 있습니다.
  • conic-gradient(gray 70%, transparent 0)
  • conic-gradient(gray 30%, transparent 0)

70%
30%

2.7.3. 텍스트 그라데이션 효과

텍스트 자체에 그라데이션을 넣을 수도 있습니다. 그라데이션에는 위의 여러 그라데이션들을 사용할 수 있습니다.
{{{#!wiki style="display: inline; color: transparent; background: text linear-gradient(to right, #e96443, #904e95); "
'''텍스트 그라데이션입니다'''}}}
텍스트 그라데이션입니다


해설:
  • display: inline; : 글자(줄)처럼 취급
  • color: transparent; : 텍스트를 투명하게 함
  • background: text; : 배경을 텍스트 바로 뒤편으로 한정함
  • background: linear-gradient(to right, #e96443, #904e95); : 배경을 특정 선형 그라데이션으로 함
  • 따라서 정확하게는 텍스트에 그라데이션을 입히는 것이 아니라, 투명한 텍스트 바로 뒤편의 배경만을 그라데이션으로 하는 것입니다.
||<tablealign=center><nopad> {{{#!wiki style="padding: 3px; background: linear-gradient(to right, #fff 50%, #000 0%);"
{{{#!wiki style="background: text linear-gradient(to right, #000 50%, #fff 0%); color: transparent; font-weight: bold;"
셀 배경과 텍스트 그라데이션 입니다}}}}}} ||
셀 배경과 텍스트 그라데이션 입니다
같은 테이블에서 셀 배경과 글씨 모두에 그라데이션을 넣고싶은 경우, 위키 스타일을 각각 써주시면 됩니다. (배경 위키스타일 안에 글씨 위키스타일 삽입)

|| {{{#!wiki style="background: text linear-gradient(to right, #e96443 , #904e95); color: transparent; font-weight: bold;"
[[그라데이션|{{{#transparent,#transparent 그라데이션 링크}}}]] 넣는 법}}} ||
중간 하이퍼링크에 같은 그라데이션을 넣고싶을 시 하이퍼링크 부분에 \링크 또는 \
링크
이렇게 투명하게 써주시면 됩니다.
단, 이 방법은 하이퍼링크 텍스트가 테이블 안에 있어야 합니다.

2.8. 글꼴 적용

\{\{\{#!wiki style="font-family: serif"
NamuWiki
나무위키
\}\}\}
NamuWiki
나무위키
위 속성을 사용해 텍스트에 글꼴을 적용시킬 수 있습니다.
주의: 열람하는 브라우저에서 사용 가능한 글꼴만이 적용됩니다. 따라서 기기에 따라 그 글꼴이 적용되지 않은 채로 나타날 수 있습니다.

속성값을 둘 이상 하여도 가능합니다. 앞에 있는 것이 우선되며, 사용 불가할 시 뒤엣것이 적용됩니다.
\{\{\{#!wiki style="font-family: '바탕','Batang',serif"
NamuWiki
나무위키
\}\}\}
NamuWiki
나무위키

2.9. 틀 관련 속성

  • 아래의 틀 문단을 참고하시기 바랍니다.
여기서 (수치)는 정수값을 의미하며, 음수값도 적용이 됩니다. calc( 수치 단위 )로 할 경우 해당 식을 계산하여 처리도 가능하나, 덧셈과 뺄셈은 기호 근처에 띄어쓰기가 추가로 필요합니다.
  • 테두리: border-(방향):(선 굵기)px (선 스타일) (색상)
    예1: 상우하좌 각각 5, 10, 15, 20px 굵기의 테두리
    border:1px solid; border-width:5px 10px 15px 20px
    예2: 전방향 1px이지만 윗부분은 5px
    border:1px solid; border-top:5px solid
    • 방향: top=위, bottom=아래, right=오른쪽, left=왼쪽, 공백=전방향.
    • 선 굵기: thin, medium, thick = 각각 1, 3, 5px, 또는 직접 입력 XXpx[1]
    • 선 스타일
none}}}
solid
double
dotted
dashed
inset
outset
groove
ridge
||
  • 선 색상: 지정 하지 않을 경우의 색상은 글씨 색깔을 따라 갑니다. border-(방향)-color로 border의 서술과 분리할 수 있으며, light-dark에 사용 할 수도 있습니다.
  • 배경 색: background-color:(색상)
  • 그림자 효과 : text-shadow:
  • 둥근 모서리: border-radius:(수치)px
    {{{#!wiki style=""
예시
border-radius:10px:
모든 방향 10px
border-radius:10px 20px:
좌상, 우하는 10px, 우상, 좌하는 20px
border-radius:5px 10px 20px:
좌상부터 시계방향으로 5px 10px 20px (좌하는 기본 5px)
border-radius:5px 10px 20px 40px :
좌상부터 시계방향으로 5px 10px 20px 40px

}}}
  • 틀 안의 여백: padding-(방향):(수치)px
    기본값은 padding:0px
  • 틀 밖의 여백: margin-(방향):(수치)px 또는 margin:(세로 적용 수치)px (가로 공통 적용 수치)px 또는 margin:(북쪽 수치)px (동쪽 수치)px (남쪽 수치)px (서쪽 수치)px}
    기본값은 margin:0px
    margin:0px auto로 주었을 경우 표 밖의 가로 여백을 자동으로 맞춥니다. 즉, 표의 화면 가운데 정렬이 됩니다.
    이 방법을 사용하면 표의 셀 내부에 이미지를 삽입할 때 여백을 없애는 것이 가능하며 양수값을 사용하면 여백이 추가되며, 음수 값을 사용할 경우 여백이 줄어듭니다. 단순히 여백 없이 사진이 셀을 최대로 채우게 하고 싶은 경우는 <nopad>로 대체 가능합니다.
    <colbgcolor=#fc6><colcolor=#000> 문법 문법 미사용
    {{{
    파일:나무위키:로고1.png
}}}||<^|1>문법 사용
||<tan><nopad> [[파일:나무위키:로고1.png]] ||||
파일:나무위키:로고1.png }}}{{{#!wiki style="float: left"
파일:나무위키:로고1.png
}}}
만약 margin이 접기나 표 밖으로 나오면 잘리며 스크롤 바가 생깁니다.[2]
  • 틀 높이: {{{#!wiki class="code"
height:(수치)px}}}
  • 틀 길이: {{{#!wiki class="code"
width:(수치)px}}} 또는
#!wiki class="code"
{{{(수치)%}}}
: %의 기준은 화면의 너비.
  • 틀 최대 길이: {{{#!wiki class="code"
max-width:(수치)px}}} 또는
#!wiki class="code"
{{{(수치)%}}}
: %의 기준은 화면의 너비.
  • 폰트 색: {{{#!wiki class="code"
color:(색상)}}}
  • 폰트 효과: {{{#!wiki class="code"
font-style: normal}}} 또는
#!wiki class="code"
{{{italic}}}
또는
#!wiki class="code"
{{{oblique}}}

  • 글자 크기: font-size: (수치)pt나 (수치)em 등.[3]
  • 글자 위치: {{{#!wiki class="code"
text-align: left}}}} 또는
#!wiki class="code"
{{{center}}}
또는
#!wiki class="code"
{{{right}}}

  • 줄 높이: font:1em/line-height math; font-family:revert
    line-height 옵션은 막혀 있으나 위와 같이 우회하여 적용할 수 있습니다. 붉은 강조 표시된 부분을 원하는 값으로 수정하여 적용하며, 기본값은 폰트 크기의 1.5배인 1.5em입니다.
  • 표의 좌, 우 정렬: float:left 또는 right 또는 center
    나무위키 이미지, 표의 정렬과 비슷하나 center의 경우 별도의 설정 없이는 표의 폭이 100%로 고정됩니다.
    float 기능을 사용하여 표의 캡션 기능과 비슷하게 이미지에도 캡션을 넣을 수 있습니다. 나무위키에는 이미지 캡션 기능이 없으므로 이렇게 써야 합니다.
파일:나무위키:로고1.png
나무위키 로고}}}}}}||
{{{#!wiki style="float: left; text-align: center"
나무위키 로고[br][[파일:나무위키:로고1.png|width=200]]}}}
||
파일:나무위키:로고1.png
나무위키 로고}}}||
나무위키 로고
파일:나무위키:로고1.png
||
  • display 속성: 표가 화면에서 어떻게 표시될지를 정합니다. 속성을 주지 않을 경우 기본값은 block입니다. 줄글 같이 취급하는 inline, 표로 취급하는 table, 안 보이게 하는 none 등이 있습니다.
    기본값인 block의 경우 강제로 표 너비의 최소를 화면의 100%로 맞춥니다. table 등으로 값을 줄 경우 이를 막을 수 있습니다.
(기본인 display:block이 됨)
파일:나무위키:로고1.png
||<width=50%>display 속성을 display:table로 준 경우
파일:나무위키:로고1.png
||



#!if version2 == null
{{{#!wiki style="border:1px solid gray;border-top:5px solid gray;padding:7px;margin-bottom:0px"
[[크리에이티브 커먼즈 라이선스|[[파일:CC-white.svg|width=22.5px]]]] 이 문단의 내용 중 전체 또는 일부는 {{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/나무위키:문법 도움말/심화|나무위키:문법 도움말/심화]]}}}{{{#!if external != "o"
[[나무위키:문법 도움말/심화]]}}}}}} 문서의 {{{#!if uuid == null
'''uuid not found'''}}}{{{#!if uuid != null
[[https://namu.wiki/w/나무위키:문법 도움말/심화?uuid=80dac44c-c55f-42fa-8ac1-34918c8a5861|r2325]]}}} 판{{{#!if paragraph != null
, [[https://namu.wiki/w/나무위키:문법 도움말/심화?uuid=80dac44c-c55f-42fa-8ac1-34918c8a5861#s-14|14번 문단]]}}}에서 가져왔습니다. [[https://namu.wiki/history/나무위키:문법 도움말/심화?commit=80dac44c-c55f-42fa-8ac1-34918c8a5861|이전 역사 보러 가기]]}}}
#!if version2 != null
{{{#!wiki style="display: block;"
{{{#!wiki style="border:1px solid gray;border-top:5px solid gray;padding:7px;margin-bottom:0px"
[[크리에이티브 커먼즈 라이선스|[[파일:CC-white.svg|width=22.5px]]]] 이 문단의 내용 중 전체 또는 일부는 다른 문서에서 가져왔습니다.
{{{#!wiki style="text-align: center"
{{{#!folding [ 펼치기 · 접기 ]
{{{#!wiki style="text-align: left; padding: 0px 10px"
{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/나무위키:문법 도움말/심화|나무위키:문법 도움말/심화]]}}}{{{#!if external != "o"
[[나무위키:문법 도움말/심화]]}}}}}} 문서의 {{{#!if uuid == null
'''uuid not found'''}}}{{{#!if uuid != null
[[https://namu.wiki/w/나무위키:문법 도움말/심화?uuid=80dac44c-c55f-42fa-8ac1-34918c8a5861|r2325]]}}} 판{{{#!if paragraph != null
, [[https://namu.wiki/w/나무위키:문법 도움말/심화?uuid=80dac44c-c55f-42fa-8ac1-34918c8a5861#s-14|14번 문단]]}}} ([[https://namu.wiki/history/나무위키:문법 도움말/심화?commit=80dac44c-c55f-42fa-8ac1-34918c8a5861|이전 역사]])
{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid2 == null
'''uuid2 not found'''}}}{{{#!if uuid2 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph2 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]]){{{#!if version3 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid3 == null
'''uuid3 not found'''}}}{{{#!if uuid3 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph3 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version4 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid4 == null
'''uuid4 not found'''}}}{{{#!if uuid4 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph4 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version5 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid5 == null
'''uuid5 not found'''}}}{{{#!if uuid5 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph5 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version6 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid6 == null
'''uuid6 not found'''}}}{{{#!if uuid6 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph6 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version7 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid7 == null
'''uuid7 not found'''}}}{{{#!if uuid7 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph7 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version8 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid8 == null
'''uuid8 not found'''}}}{{{#!if uuid8 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph8 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version9 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid9 == null
'''uuid9 not found'''}}}{{{#!if uuid9 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph9 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version10 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid10 == null
'''uuid10 not found'''}}}{{{#!if uuid10 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph10 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version11 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid11 == null
'''uuid11 not found'''}}}{{{#!if uuid11 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph11 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version12 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid12 == null
'''uuid12 not found'''}}}{{{#!if uuid12 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph12 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version13 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid13 == null
'''uuid13 not found'''}}}{{{#!if uuid13 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph13 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version14 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid14 == null
'''uuid14 not found'''}}}{{{#!if uuid14 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph14 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version15 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid15 == null
'''uuid15 not found'''}}}{{{#!if uuid15 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph15 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version16 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid16 == null
'''uuid16 not found'''}}}{{{#!if uuid16 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph16 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version17 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid17 == null
'''uuid17 not found'''}}}{{{#!if uuid17 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph17 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version18 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid18 == null
'''uuid18 not found'''}}}{{{#!if uuid18 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph18 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version19 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid19 == null
'''uuid19 not found'''}}}{{{#!if uuid19 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph19 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version20 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid20 == null
'''uuid20 not found'''}}}{{{#!if uuid20 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph20 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version21 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid21 == null
'''uuid21 not found'''}}}{{{#!if uuid21 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph21 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version22 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid22 == null
'''uuid22 not found'''}}}{{{#!if uuid22 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph22 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version23 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid23 == null
'''uuid23 not found'''}}}{{{#!if uuid23 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph23 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version24 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid24 == null
'''uuid24 not found'''}}}{{{#!if uuid24 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph24 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version25 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid25 == null
'''uuid25 not found'''}}}{{{#!if uuid25 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph25 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version26 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid26 == null
'''uuid26 not found'''}}}{{{#!if uuid26 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph26 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version27 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid27 == null
'''uuid27 not found'''}}}{{{#!if uuid27 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph27 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version28 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid28 == null
'''uuid28 not found'''}}}{{{#!if uuid28 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph28 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version29 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid29 == null
'''uuid29 not found'''}}}{{{#!if uuid29 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph29 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version30 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid30 == null
'''uuid30 not found'''}}}{{{#!if uuid30 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph30 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version31 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid31 == null
'''uuid31 not found'''}}}{{{#!if uuid31 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph31 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version32 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid32 == null
'''uuid32 not found'''}}}{{{#!if uuid32 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph32 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version33 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid33 == null
'''uuid33 not found'''}}}{{{#!if uuid33 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph33 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version34 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid34 == null
'''uuid34 not found'''}}}{{{#!if uuid34 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph34 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version35 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid35 == null
'''uuid35 not found'''}}}{{{#!if uuid35 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph35 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version36 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid36 == null
'''uuid36 not found'''}}}{{{#!if uuid36 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph36 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version37 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid37 == null
'''uuid37 not found'''}}}{{{#!if uuid37 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph37 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version38 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid38 == null
'''uuid38 not found'''}}}{{{#!if uuid38 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph38 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version39 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid39 == null
'''uuid39 not found'''}}}{{{#!if uuid39 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph39 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version40 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid40 == null
'''uuid40 not found'''}}}{{{#!if uuid40 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph40 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version41 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid41 == null
'''uuid41 not found'''}}}{{{#!if uuid41 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph41 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version42 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid42 == null
'''uuid42 not found'''}}}{{{#!if uuid42 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph42 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version43 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid43 == null
'''uuid43 not found'''}}}{{{#!if uuid43 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph43 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version44 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid44 == null
'''uuid44 not found'''}}}{{{#!if uuid44 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph44 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version45 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid45 == null
'''uuid45 not found'''}}}{{{#!if uuid45 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph45 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version46 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid46 == null
'''uuid46 not found'''}}}{{{#!if uuid46 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph46 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version47 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid47 == null
'''uuid47 not found'''}}}{{{#!if uuid47 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph47 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version48 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid48 == null
'''uuid48 not found'''}}}{{{#!if uuid48 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph48 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version49 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid49 == null
'''uuid49 not found'''}}}{{{#!if uuid49 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph49 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}{{{#!if version50 != null
{{{#!wiki style="display: block;"

{{{#!wiki style="display: inline-block"
{{{#!if external == "o"
[[https://namu.wiki/w/|]]}}}{{{#!if external != "o"
[[]]}}}}}} 문서의 {{{#!if uuid50 == null
'''uuid50 not found'''}}}{{{#!if uuid50 != null
[[https://namu.wiki/w/?uuid=|r]]}}} 판{{{#!if paragraph50 != null
, [[https://namu.wiki/w/?uuid=#s-|번 문단]]}}} ([[https://namu.wiki/history/?commit=|이전 역사]])}}}}}}}}}}}}}}}}}}}}}


3. \#!style 구문을 활용한 클래스 기반 전역 스타일 지정

{{{#!wiki style=""}}} 구문이 인라인(inline)으로 구문 내에 CSS 스타일을 부여하는 것과는 달리, {{{#!style }}} 구문은 전역으로 CSS 스타일을 부여합니다.

{{{#!style
선택자 { (스타일 속성): (스타일 값); ... }
...
}}}

HTML에서의 <style> 태그의 사용례와 같습니다.

\
#!style
{{{#tomato '''.red'''}}} {
    background-color: light-dark({{{#tomato red}}}, {{{#tomato green}}});
    color: white;
}
\
예시
다크모드에 대응하기 위해
#!wiki class="code"
{{{light-dark()}}}
CSS 함수를 사용하여 예시 스타일을 선언하였습니다. 이 경우
#!wiki class="code"
{{{red}}}
클래스를 지닌 요소는 라이트모드에서는 빨강을, 다크모드에서는 녹색을 배경색으로 사용하며 글자색은 흰색으로 나타납니다. 이 전역 속성을 실제로 적용하는 예시는 본 문단의 하위 항목을 참고해주시길 바랍니다.

주의: {{{#!style }}} 구문 내에서 선택자 중첩은 지원하지 않습니다.

주의: {{{#!style }}} 구문 내에서
#!wiki class="code"
{{{@media}}}
쿼리 등은 지원하지 않습니다.

주의: [include()] 문법으로 특정 문서의 {{{#!style }}}을 가져올 수 없습니다.

주의: {{{#!wiki }}} 구문과 같이 {{{#!style }}} 구문 또한 모든 CSS 속성들이 사용 가능한 것이 아닙니다.

주의: 기존 다크 모드 전용 선언인
#!wiki class="code"
{{{@theseed-dark-mode}}}
는 지원이 종료될 예정입니다. 이미 해당 선언이 사용되고 있는 곳이 있다면
#!wiki class="code"
{{{light-dark()}}}
CSS 함수로 값을 재지정해주시기 바랍니다. 참고

3.1. \#!wiki class="" 구문

#!style
/* 아래 예제를 위한 style 임의 설정 */
.red {
    background-color: red;
    color: white;
}
\
#!style
{{{#tomato '''.red'''}}} {
    background-color: red;
    color: white;
}
\
전역 스타일 지정
위와 같이 {{{#!style }}} 구문으로 전역 스타일을 지정했습니다.
내용은 red 클래스에 속한 모든 요소에 배경색을 빨간색으로, 글자 색상을 흰 색으로 지정한다는 의미입니다.
한번 선언한 클래스는 문서 전체에 적용되기 때문에, 여러 요소에 동일한 스타일을 적용하고 싶을 때 효과적으로 활용할 수 있습니다.
입력 출력
\
#!wiki class={{{#tomato '''"red"'''}}}
빨간색 배경에 흰 색 글자로 표시될 내용\
#!wiki class="red"
빨간색 배경에 흰 색 글자로 표시될 내용
만약 {{{#!wiki }}} 구문의 속성으로 class="red"를 입력한다면, {{{#!wiki }}} 구문 내부의 스타일이 전역으로 지정된 red 클래스의 스타일로 지정되게 됩니다.
입력 출력
\
빨간색 배경에 검은색 글자로 표시될 내용\
빨간색 배경에 검은색 글자로 표시될 내용
위의 예제에서 {{{#!wiki }}} 구문의 속성으로 글자색을 검은색으로 변경하는 속성인 style="color: black;"을 추가하게 된다면, 전역 스타일의 red 클래스 부분의 글자색을 흰 색으로 설정하는 속성인 color: white; 부분을 덮어씌웁니다. 나머지 속성인 배경색 속성 background-color: red;는 동일하게 적용되었습니다.

참고: class="class1 class2"처럼 클래스 이름을 띄어쓰기로 구분하여 여러 클래스에 소속시킬 수 있습니다.

3.2. 셀 매개변수 <class>

셀에 클래스를 지정하면 앞서 정의한 스타일을 셀에도 적용할 수 있습니다. 클래스로 지정한 스타일보다 위키 문법으로 따로 지정한 스타일이 우선합니다.

#!wiki class="code"
{{{<class>}}}
는 대응하는 HTML
#!wiki class="code"
{{{td}}}
요소에 클래스를 부여합니다.
입력 출력
{{{#!wiki style="font-family: Consolas, monospace; border-radius: 5px; margin: auto; padding: 5px 10px;"
\
<class=red> .red 적용 \ 미적용 \}}} {{{#!wiki<class=red> .red 적용 미적용 }}}
{{{#!wiki style="font-family: Consolas, monospace; border-radius: 5px; margin: auto; padding: 5px 10px;"
\
<class=red> 기본 \<class=red> 배경색 덮어쓰기 \}}} {{{#!wiki<class=red> 기본 <class=red> 배경색 덮어쓰기 }}}

주의: <colclass=...>는 지원하지 않습니다.

3.3. 행 매개변수 <rowclass>

#!wiki class="code"
{{{<rowclass>}}}
는 대응하는 HTML
#!wiki class="code"
{{{tr}}}
요소에 클래스를 부여합니다.
입력 출력
{{{#!wiki style="font-family: Consolas, monospace; border-radius: 5px; margin: auto; padding: 5px 10px;"
\
<rowclass=red> 셀1 \ 셀2 \ 셀3 \}}} {{{#!wiki<rowclass=red> 셀1 셀2 셀3 }}}

3.4. 테이블 매개변수 <tableclass>

#!wiki class="code"
{{{<tableclass>}}}
는 대응하는 HTML
#!wiki class="code"
{{{table}}}
요소에 클래스를 부여합니다.

3.4.1. 테이블 테두리 효과

나무위키 기본 스킨 espejo의 기본값은 테이블 외부(table)의 테두리는 없음, 테이블 내부 셀(td)의 테두리는 1px solid light-dark(#ddd, #383b40) 입니다. 따라서 특별히 지정하지 않는 한 일반 표에서 보이는 외곽선 테두리는 개별 셀의 테두리가 드러나 보이는 것입니다. 테두리의 속성은 틀 관련 속성 단락을 참조할 수 있습니다.

주의: <tablebordercolor>로 테두리 지정 시 자동으로 1px solid의 외부 테두리가 생성됩니다. 이 경우 외부 테두리의 실제 width는 내부 셀 테두리의 1px와 더해져 2px가 됩니다.
#!style
/* 아래 예제를 위한 style 임의 설정 */
table.border-thick { border: 5px solid red; }
table.border-none td { border: none; }
table.border-outer-none tr:first-child td { border-top: none; }
table.border-outer-none tr:last-child td { border-bottom: none; }
table.border-outer-none td:first-child { border-left: none; }
table.border-outer-none td:last-child { border-right: none; }
table.border-inner-none td { border: none; }
table.border-inner-none tr:first-child td { border-top: 1px solid light-dark(#ddd, #383b40); }
table.border-inner-none tr:last-child td { border-bottom: 1px solid light-dark(#ddd, #383b40); }
table.border-inner-none tr td:first-child { border-left: 1px solid light-dark(#ddd, #383b40); }
table.border-inner-none tr td:last-child { border-right: 1px solid light-dark(#ddd, #383b40); }
전역 스타일 지정
\
#!style
table.{{{#tomato '''border-thick'''}}} { border: 5px solid red; }
\
입력 출력
{{{#!wiki style="font-family: Consolas, monospace; border-radius: 5px; margin: auto; padding: 5px 10px;"
\
<tableclass=border-thick> 두꺼운 외부 테두리를 가진 테이블 \
\|| 1 \|| 2 \|| 3 \||
}}} ||
#!wiki
||<tableclass=border-thick><tablewidth=100%><-3> 두꺼운 외부 테두리를 가진 테이블 ||
|| 1 || 2 || 3 ||
||
테이블 외부에 5px 실선 빨간색 외부 테두리를 갖도록 하는 예시입니다. 먼저 위와 같이 {{{#!style }}} 구문으로 전역 스타일을 지정한 뒤 설정한 클래스명을 테이블의 매개변수<tableclass=border-thick>로 지정합니다.
전역 스타일 지정
\
#!style
table.{{{#tomato '''border-none'''}}} {{{#blue '''td'''}}} { border: none; }
\
입력 출력
{{{#!wiki style="font-family: Consolas, monospace; border-radius: 5px; margin: auto; padding: 5px 10px;"
\
<tableclass=border-none> 테두리가 없는 테이블 \
\|| 1 \|| 2 \|| 3 \||
}}} ||
#!wiki
||<tableclass=border-none><tablewidth=100%><-3> 테두리가 없는 테이블 ||
|| 1 || 2 || 3 ||
테이블 내외의 모든 테두리를 없애는 예시입니다. 개별 셀(td)의 테두리를 제거하면 외곽선을 포함한 테이블의 모든 테두리가 사라집니다.
전역 스타일 지정
\
#!style
table.{{{#tomato '''border-inner-none'''}}} {{{#blue '''td'''}}} { border: none; }
table.{{{#tomato '''border-inner-none'''}}} {{{#blue '''tr:first-child td'''}}} { border-top: 1px solid light-dark(#ddd, #383b40); }
table.{{{#tomato '''border-inner-none'''}}} {{{#blue '''tr:last-child td'''}}} { border-bottom: 1px solid light-dark(#ddd, #383b40); }
table.{{{#tomato '''border-inner-none'''}}} {{{#blue '''tr td:first-child'''}}} { border-left: 1px solid light-dark(#ddd, #383b40); }
table.{{{#tomato '''border-inner-none'''}}} {{{#blue '''tr td:last-child'''}}} { border-right: 1px solid light-dark(#ddd, #383b40); }
\
입력 출력
{{{#!wiki style="font-family: Consolas, monospace; border-radius: 5px; margin: auto; padding: 5px 10px;"
\
<tableclass=border-inner-none> 내부 테두리가 없는 테이블 \
\|| 1 \|| 2 \|| 3 \||
}}} ||
#!wiki
||<tableclass=border-inner-none><tablewidth=100%><-3> 내부 테두리가 없는 테이블 ||
|| 1 || 2 || 3 ||
테이블 내부 테두리만 없애는 예시입니다. 모든 td의 테두리를 none으로 지정하고 4방향 끝 요소에만 테두리를 부여합니다. 이때 테이블 외부 테두리의 형태를 별도로 지정해야 합니다. espejo 스킨 기본값은 1px solid light-dark(#ddd, #383b40)입니다.
입력 출력
{{{#!wiki style="font-family: Consolas, monospace; border-radius: 5px; margin: auto; padding: 5px 10px;"
\
<tablebordercolor=transparent> 외부 테두리가 없는 테이블 \
\|| 1 \|| 2 \|| 3 \||
}}} ||
#!wiki
||<tablebordercolor=transparent><tablewidth=100%><-3> 외부 테두리가 없는 테이블 ||
|| 1 || 2 || 3 ||
테이블 내부의 테두리는 그대로 두고 외곽선 테두리만 없애려는 경우, 특별한 사유가 없다면 <tablebordercolor=transparent> 문법만으로 손쉽게 사용할 수 있습니다. 아래는 여러 심화 문법의 사용으로 인해 해당 문법의 사용이 어려운 경우 수동적으로 구현하는 예시입니다. 개별 셀(td)의 테두리 중 4방향 끝 요소의 테두리를 none으로 지정하면 외곽선 부분의 테두리가 사라집니다.
전역 스타일 지정
\
#!style
table.{{{#tomato '''border-outer-none'''}}} {{{#blue '''tr:first-child td'''}}} { border-top: none; }
table.{{{#tomato '''border-outer-none'''}}} {{{#blue '''tr:last-child td'''}}} { border-bottom: none; }
table.{{{#tomato '''border-outer-none'''}}} {{{#blue '''td:first-child'''}}} { border-left: none; }
table.{{{#tomato '''border-outer-none'''}}} {{{#blue '''td:last-child'''}}} { border-right: none; }
\
입력 출력
{{{#!wiki style="font-family: Consolas, monospace; border-radius: 5px; margin: auto; padding: 5px 10px;"
\
<tableclass=border-outer-none> 외부 테두리가 없는 테이블 \
\|| 1 \|| 2 \|| 3 \||
}}} ||
#!wiki
||<tableclass=border-outer-none><tablewidth=100%><-3> 외부 테두리가 없는 테이블 ||
|| 1 || 2 || 3 ||

3.4.2. 특정 배수의 행 간격으로 일정한 스타일 적용

#!style
/* 아래 예제를 위한 style 임의 설정 */
table.repeated-row > tbody > tr > td:first-of-type {
    font-weight: bold;
}
table.repeated-row > tbody > tr:nth-of-type(2n) > td:first-of-type {
    color: red;
}
table.repeated-row > tbody > tr:nth-of-type(2n + 1) > td:first-of-type {
    color: lime;
}
\
#!style
table{{{#tomato '''.repeated-row'''}}} > tbody > tr > td:first-of-type {
    font-weight: bold;
}
table{{{#tomato '''.repeated-row'''}}} > tbody > tr:nth-of-type({{{#tomato 2n}}}) > td:first-of-type {
    color: red;
}
table{{{#tomato '''.repeated-row'''}}} > tbody > tr:nth-of-type({{{#tomato 2n + 1}}}) > td:first-of-type {
    color: lime;
}
\
전역 스타일 지정
위와 같이 {{{#!style }}} 구문으로 전역 스타일을 지정했습니다.
테이블 중 repeated-row 클래스를 가진 테이블만 해당되며, 적용된 스타일은 아래와 같습니다.
  • 행 내부의 첫 번째 셀에는 볼드체가 적용되도록 했습니다.
  • 2의 배수의 테이블 행 간격으로 행 내부의 첫 번째 셀의 글자색을 다음과 같이 지정했습니다.
    • 행 순번이 2번째, 4번째, 6번째...라면 빨간색
    • 행 순번이 1번째, 3번째, 5번째...라면 라임색
입력 출력
{{{#!wiki style="font-family: Consolas, monospace; border-radius: 5px; margin: auto; padding: 5px 10px;"
\
<tableclass=repeated-row> 1번째 A
\|| 2번째 || B ||
\|| 3번째 || C ||
\|| 4번째 || D ||
\|| 5번째 || E ||}}} ||
#!wiki
||<tableclass=repeated-row><tablewidth=100%><width=50%> 1번째 || A ||
|| 2번째 || B ||
|| 3번째 || C ||
|| 4번째 || D ||
|| 5번째 || E ||
||
만약 테이블의 매개변수로 <tableclass=repeated-row>를 지정한다면, 이 테이블에 repeated-row 클래스의 스타일을 적용한다는 의미입니다. 따라서 위에서도 나와있듯이 2의 배수대로 스타일이 변경되었습니다.

3.5. \#!wiki onclick="" 구문

{{{#!wiki }}} 구문의 속성으로
#!wiki class="code"
{{{onclick}}}
를 선언하면, 해당 요소를 클릭했을 때 자신 또는 다른 {{{#!wiki }}} 구문에 클래스를 부여하거나 회수합니다. 부여한 클래스는 {{{#!style }}} 구문과 함께 유용하게 사용할 수 있습니다.

#!wiki class="code"
{{{onclick}}}
속성이 수행할 수 있는 동작으로는
#!wiki class="code"
{{{add-class}}}
,
#!wiki class="code"
{{{remove-class}}}
,
#!wiki class="code"
{{{toggle-class}}}
가 있습니다. 각 동작은 동작 이름,대상 클래스,부여/회수 클래스로 선언합니다. 아래 예시를 참고하시기 바랍니다.
문법 설명
\
#!wiki onclick="add-class,exist,new"
내용
\
이 요소를 클릭하면
#!wiki class="code"
{{{exist}}}
클래스를 가진
#!wiki class="code"
{{{wiki}}}
구문에
#!wiki class="code"
{{{new}}}
클래스를 부여합니다.
\
#!wiki onclick="remove-class,remain,bye"
내용
\
이 요소를 클릭하면
#!wiki class="code"
{{{remain}}}
클래스를 가진
#!wiki class="code"
{{{wiki}}}
구문에서
#!wiki class="code"
{{{bye}}}
클래스를 회수합니다.
\
#!wiki onclick="toggle-class,folding,open"
내용
\
이 요소를 클릭하면
#!wiki class="code"
{{{folding}}}
클래스를 가진
#!wiki class="code"
{{{wiki}}}
구문에서
#!wiki class="code"
{{{open}}}
클래스를 토글합니다.
\
#!wiki onclick="add-class,a,push;remove-class,a,pop"
내용
\
클래스를 부여, 회수하는 여러 동작을 한 번에 선언할 수 있습니다. 동작은 세미콜론(
#!wiki class="code"
{{{;}}}
)으로 구분합니다.

이 요소를 클릭하면
#!wiki class="code"
{{{a}}}
클래스를 가진
#!wiki class="code"
{{{wiki}}}
구문에
#!wiki class="code"
{{{push}}}
클래스를 부여하고,
#!wiki class="code"
{{{pop}}}
클래스는 회수합니다.
#!style
/* 본 문단의 예시를 위한 blue 클래스 선언 */
.blue{background-color: blue; color: white}

예를 들어 {{{#!style }}} 구문에서
#!wiki class="code"
{{{red}}}
클래스는 '''
빨간 배경
''',
#!wiki class="code"
{{{blue}}}
클래스에는 '''
파란 배경
'''을 지정했다고 합시다.
#!wiki class="code"
{{{onclick}}}
속성으로 적절히 클래스를 부여하고 회수하면 클릭으로 요소의 서식을 변경할 수 있습니다.
입력 출력
\
#!wiki onclick="add-class,target,red;remove-class,target,blue"
클릭해서 빨강으로 바꾸세요.
\

\
#!wiki onclick="add-class,target,blue;remove-class,target,red"
클릭해서 파랑으로 바꾸세요.
\

\
#!wiki class="target red"
저는 {{{#!wiki class="code"
{{{target}}}}}} 클래스를 가졌습니다. 위 요소들을 바꾸면서 눌러보세요. 제 색이 바뀝니다.
\
#!wiki onclick="add-class,target,red;remove-class,target,blue"
클릭해서 빨강으로 바꾸세요.

#!wiki onclick="add-class,target,blue;remove-class,target,red"
클릭해서 파랑으로 바꾸세요.

#!wiki class="target red"
저는 {{{#!wiki class="code"
{{{target}}}}}} 클래스를 가졌습니다. 위 요소들을 바꾸면서 눌러보세요. 제 색이 바뀝니다.

#!wiki class="code"
{{{onclick}}}
을 선언한 요소 스스로의 클래스도 부여/회수될 수 있습니다. 이를 활용하면 토글 UI를 만들 수도 있으며, 체크박스나 펼치기 접기 문법으로 응용할 수 있습니다.
입력 출력
\
#!style
.hide {display: none;} \
\
#!wiki class="fold" onclick="toggle-class,fold,hide"
[펼치기]\
\
#!wiki class="fold hide" onclick="toggle-class,fold,hide"
[접기]\

\
#!wiki class="fold hide"
내용
\
#!style
.hide {display: none;} 
#!wiki class="fold" onclick="toggle-class,fold,hide"
[펼치기]
#!wiki class="fold hide" onclick="toggle-class,fold,hide"
[접기]
#!wiki class="fold hide"
내용
\
#!style
.hide {display: none;} \
\
#!wiki class="fold2" onclick="toggle-class,fold2,hide"
[ ] 체크박스\
\
#!wiki class="fold2 hide" onclick="toggle-class,fold2,hide"
[v] \--체크박스--\
#!wiki class="fold2" onclick="toggle-class,fold2,hide"
[ ] 체크박스
#!wiki class="fold2 hide" onclick="toggle-class,fold2,hide"
[v] --체크박스--

참고:
#!wiki class="code"
{{{onclick}}}
속성을 가진 요소에는 tag="a"로
#!wiki class="code"
{{{a}}}
태그를 부여하거나 cursor: pointer 스타일을 지정해 클릭할 수 있음을 암시하는 편이 좋습니다.

3.5.1. onclick 탭 UI

#!wiki class="code"
{{{onclick}}}
속성으로 클래스를 부여/회수할 때 그 클래스에
#!wiki class="code"
{{{display}}}
스타일 속성이 선언되어 있으면, 클릭으로 요소를 숨기거나 표시할 수 있습니다. 아래는 이를 활용해 탭 UI를 구현한 예제입니다.
입력 출력
{{{#!wiki style="font-family: Consolas, monospace; border-radius: 5px; margin: auto; padding: 5px 10px;"
\
#!style
tr.tab {display: none;}
tr.selected {display: table-row;}
\

\
\
#!wiki onclick="remove-class,tab,selected;add-class,tab-a,selected" tag="a" class="tab tab-a selected"
A 열기
\
\
\
#!wiki onclick="remove-class,tab,selected;add-class,tab-b,selected" tag="a" class="tab tab-b"
B 열기
\
\
\
#!wiki onclick="remove-class,tab,selected;add-class,tab-c,selected" tag="a" class="tab tab-c"
C 열기
\
\
\||<-3><rowclass=tab tab-a selected> A(기본값)가 열렸습니다. 상단 탭을 눌러 탐색하세요. \||
\||<-3><rowclass=tab tab-b> B가 열렸습니다. \||
\||<-3><rowclass=tab tab-c> C가 열렸습니다. \||}}} ||
#!style
tr.tab {
    display: none;
}
tr.selected {
    display: table-row;
}
#!wiki onclick="remove-class,tab,selected;add-class,tab-a,selected" tag="a" class="tab tab-a selected"
A 열기
#!wiki onclick="remove-class,tab,selected;add-class,tab-b,selected" tag="a" class="tab tab-b"
B 열기
#!wiki onclick="remove-class,tab,selected;add-class,tab-c,selected" tag="a" class="tab tab-c"
C 열기
<rowclass=tab tab-a selected> A(기본값)가 열렸습니다. 상단 탭을 눌러 탐색하세요.
<rowclass=tab tab-b> B가 열렸습니다.
<rowclass=tab tab-c> C가 열렸습니다.
||
3.5.1.1. 기본으로 표시될 탭 지정
#!wiki class="code"
onclick
속성을 활용해 만든 탭 UI 중 문서를 로드했을 때
#!wiki class="code"
display: none@매개변수@
와 같은 css hack을 사용하고, 매개변수를 받아 어떤 탭이 가장 먼저 펼쳐질지 선택할 수 있습니다.
입력 출력
{{{#!wiki style="font-family: Consolas, monospace; border-radius: 5px; margin: auto; padding: 5px 10px;"
\
#!if Aclass = (default == 'A') ? 'selected' : ' '; Bclass = (default == 'B') ? 'selected' : ' '
\
\
#!style
.tab { display: none; }
.defaultA { display: block; display: none{{{#!html &commat;}}}Aclass@ }
.defaultB { display: block; display: none{{{#!html &commat;}}}Bclass@ }
.selected { display: block; }
\

\
\
#!wiki onclick="remove-class,tab,selected;add-class,tab-a,selected;remove-class,defaultB,defaultB" tag="a" class="btn btn-a"
A 열기
\
\
\
#!wiki onclick="remove-class,tab,selected;add-class,tab-b,selected;remove-class,defaultA,defaultA" tag="a" class="btn btn-b"
B 열기
\
\
\||<-2> \
#!wiki class="tab tab-a defaultA"
A의 내용
\
\
#!wiki class="tab tab-b defaultB"
B의 내용
\
\||
}}}
[include(틀:기본, default=B)]||
#!wiki ##상위 문단과 간섭하여 변수명을 다르게 한 점 양해 부탁드립니다.
{{{#!if default = 'B'; Aclass = (default == 'A') ? 'selected' : ' '; Bclass = (default == 'B') ? 'selected' : ' '
}}}{{{#!style
.tab-alpha { display: none; }
.defaultA { display: block; display: none@Aclass@ }
.defaultB { display: block; display: none@Bclass@ }
.selected { display: block; }
}}}
||<tablewidth=100%> {{{#!wiki onclick="remove-class,tab-alpha,selected;add-class,tab-alpha-a,selected;remove-class,defaultB,defaultB" tag="a"
A 열기
}}} || {{{#!wiki onclick="remove-class,tab-alpha,selected;add-class,tab-alpha-b,selected;remove-class,defaultA,defaultA" tag="a"
B 열기
}}} ||
||<-2> {{{#!wiki class="tab-alpha tab-alpha-a defaultA"
A의 내용
}}}{{{#!wiki class="tab-alpha tab-alpha-b defaultB"
B의 내용
}}} ||
||

3.5.2. 다중 필터링 목록(라디오 버튼, 체크박스)

#!wiki class="code"
onclick
속성의 클래스 제어 명령어
#!wiki class="code"
toggle-class
,
#!wiki class="code"
add-class
,
#!wiki class="code"
remove-class
와 CSS의
#!wiki class="code"
display: none
속성을 이용하여, 특정 조건의 조합(같은 필터 그룹 안에서는 체크박스 방식인 경우 OR, 다른 필터 그룹 사이에서는 AND)에 해당하는 항목만 표시할 수 있는 다중 필터링 목록을 구현할 수 있습니다.

다중 필터링 작동 원리 설명은 하단의 예제를 기준으로 서술하며, 실제 적용 시 클래스명이나 세부 디자인 스타일은 자유롭게 변경할 수 있습니다.
  • 필터 그룹과 필터 버튼
    • 이하 필터 그룹이란 예제의 '대륙', '색상'처럼 필터 항목들을 묶는 상위 개념을 의미합니다.
    • 카드 하나가 한 그룹 안에서 해당하는 항목 수는 그룹마다 다릅니다. 예제의 '대륙'은 카드마다 정확히 1개(대한민국은 아시아에만 해당), '색상'은 0~4개(대한민국은 빨강·파랑·검정에 해당)입니다.
    • 필터 버튼은 하나를 켜면 나머지가 꺼지는 라디오 버튼(단일 선택) 방식과, 같은 그룹의 버튼을 여러 개 동시에 켤 수 있는 체크박스(복수 선택) 방식 중에서 고를 수 있습니다. 예제의 '대륙'은 라디오 버튼 방식, '색상'은 체크박스 방식입니다.
  • 필터링 목록의 초기 상태 정의
    • 필터링 목록은 필터링 대상 카드 전체를 감싸는 전체 목록 식별 클래스(예: flag-list)가 필요합니다. {{{#!wiki class="flag-list ..." (필터링 대상 카드들)}}}
      • 이 클래스는 {{{#!wiki class="code"
onclick}}}이 조작 대상을 이름으로 지목하는 데 쓰이므로, 한 문서에 필터링 목록이 여럿이라면 목록마다 다른 이름을 붙여야 합니다.
  • 체크박스 그룹의 경우, 필터링 목록을 선언할 때 {{{#!wiki class="flag-list off-빨강 off-파랑 off-노랑 off-검정" }}}처럼 전체 목록 식별 클래스(flag-list) 뒤에 띄어쓰기로 구분하여 모든 필터 항목에 필터 꺼짐 클래스(off-*)를 미리 부여합니다. 라디오 버튼 그룹은 off-*가 필요 없습니다.
  • 초기 상태에는 전체 목록에 필터 켜짐 클래스(on-*)가 전부 존재하지 않으므로 후술할 CSS 필터링 규칙이 동작하지 않아 목록 내 모든 카드(20개)가 표시됩니다.
  • 필터링 대상 카드에 조합 클래스 부여
  • 카드에는 카드 스타일 클래스(card) 뒤에, 필터 그룹마다 조합 클래스를 하나씩 부여합니다. 조합 클래스는 그룹명- 뒤에 카드가 속한 항목을 정해진 순서대로 띄어쓰기 없이 이어 붙인 것입니다.
    • 예1) 대한민국(아시아, 빨강·파랑·검정): 대륙-아시아 색상-빨강파랑검정
    • 예2) 독일(유럽, 빨강·노랑·검정): 대륙-유럽 색상-빨강노랑검정
    • 예3) 남아프리카 공화국(아프리카, 네 색 전부): 대륙-아프리카 색상-빨강파랑노랑검정
  • 항목을 잇는 순서는 버튼 순서(예제는 빨강→파랑→노랑→검정)로 고정합니다. 순서가 바뀐 색상-파랑빨강은 CSS 필터링 규칙과 맞지 않아 걸러지지 않습니다.
  • 어느 항목에도 속하지 않는 카드는 그룹명-없음을 부여합니다.
    • 예) 파키스탄(초록·흰색): 대륙-아시아 색상-없음
  • 두 그룹을 함께 부여하면 카드 코드는 다음과 같습니다.
    • 예) 대한민국 카드 코드: {{{#!wiki class="card 대륙-아시아 색상-빨강파랑검정" ... 대한민국 ...}}}
      • card: 카드의 외형 모양 및 테두리를 지정하는 카드 스타일 클래스
      • 대륙-아시아: '대륙' 필터 그룹에서 '아시아'에 속함
      • 색상-빨강파랑검정: '색상' 필터 그룹에서 '빨강', '파랑', '검정'에 속함
  • CSS 필터링 규칙
  • 조합에 들어 있는 항목이 모두 꺼져 있고, 조합에 없는 항목이 하나라도 켜져 있으면 그 카드를 숨깁니다. 조합에 든 항목이 하나라도 켜지면 다시 보이므로, 같은 그룹 안에서는 OR로 동작합니다.
  • 라디오 버튼: 조합 클래스마다 항목1항목2...로 이루어진 조합에 없는 항목 X1, X2, ...마다 .on-X1 .그룹명-조합을 만들어 쉼표로 이어 조합 하나당 한 줄로 적습니다.
    • 예) 대륙-아시아: .on-유럽 .대륙-아시아, .on-아프리카 .대륙-아시아, .on-아메리카 .대륙-아시아, .on-오세아니아 .대륙-아시아
  • 체크박스: 조합 클래스마다 항목1항목2...로 이루어진 조합에 없는 항목 X1, X2, ...마다 .on-X1.off-항목1.off-항목2… .그룹명-조합을 만들어 쉼표로 이어 조합 하나당 한 줄로 적습니다.
    • 예1) 색상-빨강: 규칙 3개
      • .on-파랑.off-빨강 .색상-빨강, .on-노랑.off-빨강 .색상-빨강, .on-검정.off-빨강 .색상-빨강
      • 파랑·노랑·검정 중 하나라도 켜져 있고 빨강이 꺼져 있으면 숨깁니다. 빨강을 켜면 off 조건이 깨져 보입니다.
    • 예2) 색상-파랑검정: 규칙 2개
      • .on-빨강.off-파랑.off-검정 .색상-파랑검정, .on-노랑.off-파랑.off-검정 .색상-파랑검정
      • 빨강·노랑 중 하나라도 켜져 있고 파랑·검정이 모두 꺼져 있으면 숨깁니다. 파랑·검정 중 하나라도 켜면 off 조건이 깨져 보입니다.
    • 예3) 색상-빨강파랑검정: 규칙 1개
      • .on-노랑.off-빨강.off-파랑.off-검정 .색상-빨강파랑검정
      • 노랑이 켜져 있고 빨강·파랑·검정이 모두 꺼져 있으면 숨깁니다. 빨강·파랑·검정 중 하나라도 켜면 off 조건이 깨져 보입니다.
    • 예4) 색상-빨강파랑노랑검정: 규칙 없음
      • 조합에 없는 항목이 없으므로 숨기는 조건이 없습니다. 무엇을 켜든 보입니다.
    • 예5) 색상-없음: 규칙 4개
      • .on-빨강 .색상-없음, .on-파랑 .색상-없음, .on-노랑 .색상-없음, .on-검정 .색상-없음
      • 빨강·파랑·노랑·검정 중 하나라도 켜져 있으면 숨깁니다. 조합에 든 항목이 없어 off 조건이 없으므로, 아무것도 켜지 않았을 때만 보입니다.
  • 규칙 수가 항목 수와 카드당 해당 항목 수에 따라 빠르게 늘어나므로, 해당 항목이 여럿일 수 있는 그룹은 항목 수를 적게 잡고 카드당 해당 항목 수의 상한을 정해 두는 것이 좋습니다. 아래 표는 해당 항목이 항상 1개인 그룹과, '없음'을 포함해 가능한 모든 조합의 규칙을 만들어 둔 그룹의 규칙 수입니다.

    • 항목 수
      [math(N)]
      카드 당 해당 항목 1개
      [math(N \times (N - 1))]
      모든 규칙 작성 시
      [math(N \times 2^{N - 1})]

      3개 6개 12개

      4개 12개 32개

      5개 20개 80개

      6개 30개 192개
  • 필터 버튼의 {{{#!wiki class="code"
onclick}}} 동작 및 버튼 활성 상태 표시
  • 필터 버튼에는 버튼 스타일 클래스(btn)와 개별 필터 버튼 식별 클래스(btn-*)를 부여하고, 클릭 시 동작할 {{{#!wiki class="code"
onclick}}} 속성을 작성합니다. 버튼을 누르면 전체 목록(flag-list)의 필터 켜짐·꺼짐 클래스를 바꾸고, 필터 버튼 식별 클래스에 버튼 활성 상태 클래스(active)를 토글하여 선택 여부를 표시합니다.
  • active가 붙은 버튼은 CSS에 선언된 .btn.active 스타일에 따라 배경색과 테두리가 강조됩니다.
  • 라디오 버튼: 자기 항목의 on과 active를 토글하고, 같은 그룹의 나머지 항목마다 on과 버튼의 active를 지웁니다. 한 번에 하나만 켜지므로 off는 쓰지 않습니다.
  • 예) 예제의 '대륙' 아시아 버튼: {{{#!wiki class="btn btn-아시아" onclick="toggle-class,flag-list,on-아시아;toggle-class,btn-아시아,active;remove-class,flag-list,on-유럽;remove-class,btn-유럽,active;..." ... 아시아 ...}}}
    • 전체 목록에 on-아시아를 켜거나 끄고, 나머지 대륙의 on-*을 지웁니다. 다른 대륙을 누르면 아시아가 꺼집니다.
  • 체크박스: 자기 항목의 on과 off를 맞바꾸고 active를 토글합니다. 다른 항목은 건드리지 않습니다.
  • 예) 예제의 '색상' 빨강 버튼: {{{#!wiki class="btn btn-빨강" onclick="toggle-class,flag-list,on-빨강;toggle-class,flag-list,off-빨강;toggle-class,btn-빨강,active" ... 빨강 ...}}}
    • 전체 목록에 on-빨강을 추가하고 동시에 off-빨강을 제거합니다. 버튼을 다시 누르면 반대로 토글됩니다.
  • 서로 다른 필터 그룹 간 교집합(AND) 연산
  • 모든 CSS 필터링 규칙은 카드를 숨기기만 하므로, 필터 그룹이 몇 개든 각 그룹의 규칙이 서로 독립적으로 동작합니다.
  • 결국 각 필터 그룹의 숨김 조건을 모두 통과한(AND) 카드만 최종적으로 화면에 남게 됩니다.
  • 예1) '아시아'와 '빨강' 필터 버튼을 동시에 누르면 '대륙' 필터 그룹의 규칙에 따라 유럽·아프리카·아메리카·오세아니아 카드가 숨겨지고, '색상' 필터 그룹의 규칙에 따라 빨강이 없는 조합(색상-파랑, 색상-없음 등)의 카드가 숨겨져 두 조건을 모두 통과한 대한민국·일본·중국 3개만 화면에 남습니다.
  • 예2) '유럽'과 '검정' 필터 버튼을 동시에 누르면 독일과 알바니아 2개만 화면에 남습니다.
  • 필터 초기화 버튼 동작
  • 필터 초기화 버튼을 클릭하면 전체 목록 식별 클래스(flag-list)를 대상으로 {{{#!wiki class="code"
remove-class}}}를 실행해 켜져 있던 모든 필터 켜짐 클래스(on-*)를 일괄 제거하고,
#!wiki class="code"
{{{add-class}}}
로 모든 필터 꺼짐 클래스(off-*)를 다시 채워 넣습니다. 라디오 버튼 그룹은 on-*만 지우고 off-*는 채우지 않습니다.
  • 동시에 버튼 스타일 클래스인 btn을 대상으로 remove-class,btn,active를 실행해 시각적으로 활성화되어 있던 모든 필터 버튼의 강조 표시(active)를 한 번에 끕니다.
    • 예) {{{#!wiki class="btn" onclick="remove-class,flag-list,on-아시아;...;add-class,flag-list,off-빨강;...;remove-class,btn,active" 🔄 필터 초기화}}}

#!style
/* 국기 목록 */
.flag-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 10px;
    padding: 10px 10px 0;
}
/* 카드 기본 스타일 */
.card {
    display: inline-block;
    vertical-align: top;
    width: 100px;
    flex-grow: 1;
    margin: 0 0 10px;
    box-sizing: border-box;
}
.card > a {
    display: block;
    text-decoration: none;
    color: inherit;
}
.card-st {
    padding: 6px 4px;
    border: 1px solid;
    border-color: light-dark(lightgray, dimgray);
    border-radius: 6px;
    text-align: center;
    font-size: 0.85em;
    background-color: light-dark(whitesmoke, darkgray);
    color: black;
    white-space: nowrap;
    overflow: hidden;
}
.card:hover .card-st {
    border-color: light-dark(gray, silver);
}
.card-spacer {
    display: inline-block;
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
    flex-grow: 1;
    width: 100px;
}
/* 국기 이미지 칸 */
.card-img {
    display: inline-block;
    margin-bottom: 3px;
}
/* 버튼 스타일 */
.btn {
    display: inline-block;
    padding: 3px 8px;
    margin: 1px;
    border: 1px solid;
    border-color: light-dark(lightgray, dimgray);
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.8em;
    background-color: light-dark(whitesmoke, darkgray);
    color: black;
}
.btn.active {
    background-color: light-dark(orange, darkorange);
    color: white;
    border-color: light-dark(orange, darkorange);
}
/* 색상 버튼 글자색 */
.btn-빨강 { color: red; }
.btn-파랑 { color: light-dark(blue, dodgerblue); }
.btn-노랑 { color: light-dark(goldenrod, gold); }
.btn-검정 { color: black; }
/* [대륙] - 라디오 버튼 방식 */
.on-유럽 .대륙-아시아, .on-아프리카 .대륙-아시아, .on-아메리카 .대륙-아시아, .on-오세아니아 .대륙-아시아,
.on-아시아 .대륙-유럽, .on-아프리카 .대륙-유럽, .on-아메리카 .대륙-유럽, .on-오세아니아 .대륙-유럽,
.on-아시아 .대륙-아프리카, .on-유럽 .대륙-아프리카, .on-아메리카 .대륙-아프리카, .on-오세아니아 .대륙-아프리카,
.on-아시아 .대륙-아메리카, .on-유럽 .대륙-아메리카, .on-아프리카 .대륙-아메리카, .on-오세아니아 .대륙-아메리카,
.on-아시아 .대륙-오세아니아, .on-유럽 .대륙-오세아니아, .on-아프리카 .대륙-오세아니아, .on-아메리카 .대륙-오세아니아 { display: none; }
/* [색상] - 체크박스 방식 */
.on-빨강 .색상-없음, .on-파랑 .색상-없음, .on-노랑 .색상-없음, .on-검정 .색상-없음,
.on-파랑.off-빨강 .색상-빨강, .on-노랑.off-빨강 .색상-빨강, .on-검정.off-빨강 .색상-빨강,
.on-빨강.off-파랑 .색상-파랑, .on-노랑.off-파랑 .색상-파랑, .on-검정.off-파랑 .색상-파랑,
.on-노랑.off-빨강.off-파랑 .색상-빨강파랑, .on-검정.off-빨강.off-파랑 .색상-빨강파랑,
.on-파랑.off-빨강.off-노랑 .색상-빨강노랑, .on-검정.off-빨강.off-노랑 .색상-빨강노랑,
.on-파랑.off-빨강.off-검정 .색상-빨강검정, .on-노랑.off-빨강.off-검정 .색상-빨강검정,
.on-빨강.off-파랑.off-노랑 .색상-파랑노랑, .on-검정.off-파랑.off-노랑 .색상-파랑노랑,
.on-빨강.off-노랑.off-검정 .색상-노랑검정, .on-파랑.off-노랑.off-검정 .색상-노랑검정,
.on-검정.off-빨강.off-파랑.off-노랑 .색상-빨강파랑노랑,
.on-노랑.off-빨강.off-파랑.off-검정 .색상-빨강파랑검정,
.on-파랑.off-빨강.off-노랑.off-검정 .색상-빨강노랑검정 { display: none; }
<colbgcolor=#fc6,DarkGoldenRod> 문법 {{{#!folding [ 문법 펼치기 · 접기 ]
{{{#!wiki style="overflow-x: auto; max-width: 1000px;"
{
{{#!style
/* 국기 목록 */
.flag-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 10px;
    padding: 10px 10px 0;
}
/* 카드 기본 스타일 */
.card {
    display: inline-block;
    vertical-align: top;
    width: 100px;
    flex-grow: 1;
    margin: 0 0 10px;
    box-sizing: border-box;
}
.card > a {
    display: block;
    text-decoration: none;
    color: inherit;
}
.card-st {
    padding: 6px 4px;
    border: 1px solid;
    border-color: light-dark(lightgray, dimgray);
    border-radius: 6px;
    text-align: center;
    font-size: 0.85em;
    background-color: light-dark(whitesmoke, darkgray);
    color: black;
    white-space: nowrap;
    overflow: hidden;
}
.card:hover .card-st {
    border-color: light-dark(gray, silver);
}
.card-spacer {
    display: inline-block;
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
    flex-grow: 1;
    width: 100px;
}
/* 국기 이미지 칸 */
.card-img {
    display: inline-block;
    margin-bottom: 3px;
}
/* 버튼 스타일 */
.btn {
    display: inline-block;
    padding: 3px 8px;
    margin: 1px;
    border: 1px solid;
    border-color: light-dark(lightgray, dimgray);
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.8em;
    background-color: light-dark(whitesmoke, darkgray);
    color: black;
}
.btn.active {
    background-color: light-dark(orange, darkorange);
    color: white;
    border-color: light-dark(orange, darkorange);
}
/* 색상 버튼 글자색 */
.btn-빨강 { color: red; }
.btn-파랑 { color: light-dark(blue, dodgerblue); }
.btn-노랑 { color: light-dark(goldenrod, gold); }
.btn-검정 { color: black; }
/* [대륙] - 라디오 버튼 방식 */
.on-유럽 .대륙-아시아, .on-아프리카 .대륙-아시아, .on-아메리카 .대륙-아시아, .on-오세아니아 .대륙-아시아,
.on-아시아 .대륙-유럽, .on-아프리카 .대륙-유럽, .on-아메리카 .대륙-유럽, .on-오세아니아 .대륙-유럽,
.on-아시아 .대륙-아프리카, .on-유럽 .대륙-아프리카, .on-아메리카 .대륙-아프리카, .on-오세아니아 .대륙-아프리카,
.on-아시아 .대륙-아메리카, .on-유럽 .대륙-아메리카, .on-아프리카 .대륙-아메리카, .on-오세아니아 .대륙-아메리카,
.on-아시아 .대륙-오세아니아, .on-유럽 .대륙-오세아니아, .on-아프리카 .대륙-오세아니아, .on-아메리카 .대륙-오세아니아 { display: none; }
/* [색상] - 체크박스 방식 */
.on-빨강 .색상-없음, .on-파랑 .색상-없음, .on-노랑 .색상-없음, .on-검정 .색상-없음,
.on-파랑.off-빨강 .색상-빨강, .on-노랑.off-빨강 .색상-빨강, .on-검정.off-빨강 .색상-빨강,
.on-빨강.off-파랑 .색상-파랑, .on-노랑.off-파랑 .색상-파랑, .on-검정.off-파랑 .색상-파랑,
.on-노랑.off-빨강.off-파랑 .색상-빨강파랑, .on-검정.off-빨강.off-파랑 .색상-빨강파랑,
.on-파랑.off-빨강.off-노랑 .색상-빨강노랑, .on-검정.off-빨강.off-노랑 .색상-빨강노랑,
.on-파랑.off-빨강.off-검정 .색상-빨강검정, .on-노랑.off-빨강.off-검정 .색상-빨강검정,
.on-빨강.off-파랑.off-노랑 .색상-파랑노랑, .on-검정.off-파랑.off-노랑 .색상-파랑노랑,
.on-빨강.off-노랑.off-검정 .색상-노랑검정, .on-파랑.off-노랑.off-검정 .색상-노랑검정,
.on-검정.off-빨강.off-파랑.off-노랑 .색상-빨강파랑노랑,
.on-노랑.off-빨강.off-파랑.off-검정 .색상-빨강파랑검정,
.on-파랑.off-빨강.off-노랑.off-검정 .색상-빨강노랑검정 { display: none; }
<tablewidth=600><tablebgcolor=transparent> 국기 목록
#!wiki class="btn" onclick="remove-class,flag-list,on-아시아;remove-class,flag-list,on-유럽;remove-class,flag-list,on-아프리카;remove-class,flag-list,on-아메리카;remove-class,flag-list,on-오세아니아;remove-class,flag-list,on-빨강;remove-class,flag-list,on-파랑;remove-class,flag-list,on-노랑;remove-class,flag-list,on-검정;add-class,flag-list,off-빨강;add-class,flag-list,off-파랑;add-class,flag-list,off-노랑;add-class,flag-list,off-검정;remove-class,btn,active"
🔄 필터 초기화
<bgcolor=slategray,darkgray> 대륙
(라디오 버튼)
#!wiki class="btn btn-아시아" onclick="toggle-class,flag-list,on-아시아;toggle-class,btn-아시아,active;remove-class,flag-list,on-유럽;remove-class,btn-유럽,active;remove-class,flag-list,on-아프리카;remove-class,btn-아프리카,active;remove-class,flag-list,on-아메리카;remove-class,btn-아메리카,active;remove-class,flag-list,on-오세아니아;remove-class,btn-오세아니아,active"
아시아
#!wiki class="btn btn-유럽" onclick="toggle-class,flag-list,on-유럽;toggle-class,btn-유럽,active;remove-class,flag-list,on-아시아;remove-class,btn-아시아,active;remove-class,flag-list,on-아프리카;remove-class,btn-아프리카,active;remove-class,flag-list,on-아메리카;remove-class,btn-아메리카,active;remove-class,flag-list,on-오세아니아;remove-class,btn-오세아니아,active"
유럽
#!wiki class="btn btn-아프리카" onclick="toggle-class,flag-list,on-아프리카;toggle-class,btn-아프리카,active;remove-class,flag-list,on-아시아;remove-class,btn-아시아,active;remove-class,flag-list,on-유럽;remove-class,btn-유럽,active;remove-class,flag-list,on-아메리카;remove-class,btn-아메리카,active;remove-class,flag-list,on-오세아니아;remove-class,btn-오세아니아,active"
아프리카
#!wiki class="btn btn-아메리카" onclick="toggle-class,flag-list,on-아메리카;toggle-class,btn-아메리카,active;remove-class,flag-list,on-아시아;remove-class,btn-아시아,active;remove-class,flag-list,on-유럽;remove-class,btn-유럽,active;remove-class,flag-list,on-아프리카;remove-class,btn-아프리카,active;remove-class,flag-list,on-오세아니아;remove-class,btn-오세아니아,active"
아메리카
#!wiki class="btn btn-오세아니아" onclick="toggle-class,flag-list,on-오세아니아;toggle-class,btn-오세아니아,active;remove-class,flag-list,on-아시아;remove-class,btn-아시아,active;remove-class,flag-list,on-유럽;remove-class,btn-유럽,active;remove-class,flag-list,on-아프리카;remove-class,btn-아프리카,active;remove-class,flag-list,on-아메리카;remove-class,btn-아메리카,active"
오세아니아
<bgcolor=slategray,darkgray> 색상
(체크박스)
#!wiki class="btn btn-빨강" onclick="toggle-class,flag-list,on-빨강;toggle-class,flag-list,off-빨강;toggle-class,btn-빨강,active"
빨강
#!wiki class="btn btn-파랑" onclick="toggle-class,flag-list,on-파랑;toggle-class,flag-list,off-파랑;toggle-class,btn-파랑,active"
파랑
#!wiki class="btn btn-노랑" onclick="toggle-class,flag-list,on-노랑;toggle-class,flag-list,off-노랑;toggle-class,btn-노랑,active"
노랑
#!wiki class="btn btn-검정" onclick="toggle-class,flag-list,on-검정;toggle-class,flag-list,off-검정;toggle-class,btn-검정,active"
검정
#!wiki class="card 대륙-아시아 색상-빨강파랑검정"
[[대한민국|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:대한민국 국기.svg|height=40]]}}}[br]'''대한민국'''[br]{{{-2 아시아[br]빨강·파랑·검정}}}
}}}]]
#!wiki class="card 대륙-아시아 색상-빨강"
[[일본|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:일본 국기.svg|height=40]]}}}[br]'''일본'''[br]{{{-2 아시아[br]빨강}}}
}}}]]
#!wiki class="card 대륙-아시아 색상-빨강노랑"
[[중국|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:중국 국기.svg|height=40]]}}}[br]'''중국'''[br]{{{-2 아시아[br]빨강·노랑}}}
}}}]]
#!wiki class="card 대륙-아시아 색상-없음"
[[파키스탄|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:파키스탄 국기.svg|height=40]]}}}[br]'''파키스탄'''[br]{{{-2 아시아[br]해당 없음}}}
}}}]]
#!wiki class="card 대륙-유럽 색상-빨강파랑"
[[프랑스|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:프랑스 국기.svg|height=40]]}}}[br]'''프랑스'''[br]{{{-2 유럽[br]빨강·파랑}}}
}}}]]
#!wiki class="card 대륙-유럽 색상-파랑"
[[그리스|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:그리스 국기.svg|height=40]]}}}[br]'''그리스'''[br]{{{-2 유럽[br]파랑}}}
}}}]]
#!wiki class="card 대륙-유럽 색상-빨강노랑검정"
[[독일|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:독일 국기.svg|height=40]]}}}[br]'''독일'''[br]{{{-2 유럽[br]빨강·노랑·검정}}}
}}}]]
#!wiki class="card 대륙-유럽 색상-빨강검정"
[[알바니아|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:알바니아 국기.svg|height=40]]}}}[br]'''알바니아'''[br]{{{-2 유럽[br]빨강·검정}}}
}}}]]
#!wiki class="card 대륙-아프리카 색상-빨강파랑노랑검정"
[[남아프리카 공화국|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:남아프리카 공화국 국기.svg|height=40]]}}}[br]'''남아프리카 공화국'''[br]{{{-2 아프리카[br]빨강·파랑·노랑·검정}}}
}}}]]
#!wiki class="card 대륙-아프리카 색상-빨강검정"
[[케냐|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:케냐 국기.svg|height=40]]}}}[br]'''케냐'''[br]{{{-2 아프리카[br]빨강·검정}}}
}}}]]
#!wiki class="card 대륙-아프리카 색상-빨강노랑검정"
[[가나|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:가나 국기.svg|height=40]]}}}[br]'''가나'''[br]{{{-2 아프리카[br]빨강·노랑·검정}}}
}}}]]
#!wiki class="card 대륙-아프리카 색상-없음"
[[나이지리아|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:나이지리아 국기.svg|height=40]]}}}[br]'''나이지리아'''[br]{{{-2 아프리카[br]해당 없음}}}
}}}]]
#!wiki class="card 대륙-아메리카 색상-빨강파랑"
[[미국|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:미국 국기.svg|height=40]]}}}[br]'''미국'''[br]{{{-2 아메리카[br]빨강·파랑}}}
}}}]]
#!wiki class="card 대륙-아메리카 색상-빨강"
[[캐나다|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:캐나다 국기.svg|height=40]]}}}[br]'''캐나다'''[br]{{{-2 아메리카[br]빨강}}}
}}}]]
#!wiki class="card 대륙-아메리카 색상-노랑검정"
[[자메이카|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:자메이카 국기.svg|height=40]]}}}[br]'''자메이카'''[br]{{{-2 아메리카[br]노랑·검정}}}
}}}]]
#!wiki class="card 대륙-아메리카 색상-빨강파랑노랑"
[[콜롬비아|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:콜롬비아 국기.svg|height=40]]}}}[br]'''콜롬비아'''[br]{{{-2 아메리카[br]빨강·파랑·노랑}}}
}}}]]
#!wiki class="card 대륙-오세아니아 색상-빨강파랑"
[[호주|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:호주 국기.svg|height=40]]}}}[br]'''호주'''[br]{{{-2 오세아니아[br]빨강·파랑}}}
}}}]]
#!wiki class="card 대륙-오세아니아 색상-빨강노랑검정"
[[파푸아뉴기니|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:파푸아뉴기니 국기.svg|height=40]]}}}[br]'''파푸아뉴기니'''[br]{{{-2 오세아니아[br]빨강·노랑·검정}}}
}}}]]
#!wiki class="card 대륙-오세아니아 색상-빨강"
[[통가|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:통가 국기.svg|height=40]]}}}[br]'''통가'''[br]{{{-2 오세아니아[br]빨강}}}
}}}]]
#!wiki class="card 대륙-오세아니아 색상-파랑노랑"
[[팔라우|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:팔라우 국기.svg|height=40]]}}}[br]'''팔라우'''[br]{{{-2 오세아니아[br]파랑·노랑}}}
}}}]]
#!wiki class="card-spacer"
#!wiki class="card-spacer"
#!wiki class="card-spacer"
#!wiki class="card-spacer"
#!wiki class="card-spacer"
#!wiki class="card-spacer"
#!wiki class="card-spacer"
#!wiki class="card-spacer"
}}}}}}
}}} ||
결과 {{{#!wiki 국기 목록
#!wiki class="btn" onclick="remove-class,flag-list,on-아시아;remove-class,flag-list,on-유럽;remove-class,flag-list,on-아프리카;remove-class,flag-list,on-아메리카;remove-class,flag-list,on-오세아니아;remove-class,flag-list,on-빨강;remove-class,flag-list,on-파랑;remove-class,flag-list,on-노랑;remove-class,flag-list,on-검정;add-class,flag-list,off-빨강;add-class,flag-list,off-파랑;add-class,flag-list,off-노랑;add-class,flag-list,off-검정;remove-class,btn,active"
🔄 필터 초기화
<bgcolor=slategray,darkgray> 대륙
(라디오 버튼)
#!wiki class="btn btn-아시아" onclick="toggle-class,flag-list,on-아시아;toggle-class,btn-아시아,active;remove-class,flag-list,on-유럽;remove-class,btn-유럽,active;remove-class,flag-list,on-아프리카;remove-class,btn-아프리카,active;remove-class,flag-list,on-아메리카;remove-class,btn-아메리카,active;remove-class,flag-list,on-오세아니아;remove-class,btn-오세아니아,active"
아시아
#!wiki class="btn btn-유럽" onclick="toggle-class,flag-list,on-유럽;toggle-class,btn-유럽,active;remove-class,flag-list,on-아시아;remove-class,btn-아시아,active;remove-class,flag-list,on-아프리카;remove-class,btn-아프리카,active;remove-class,flag-list,on-아메리카;remove-class,btn-아메리카,active;remove-class,flag-list,on-오세아니아;remove-class,btn-오세아니아,active"
유럽
#!wiki class="btn btn-아프리카" onclick="toggle-class,flag-list,on-아프리카;toggle-class,btn-아프리카,active;remove-class,flag-list,on-아시아;remove-class,btn-아시아,active;remove-class,flag-list,on-유럽;remove-class,btn-유럽,active;remove-class,flag-list,on-아메리카;remove-class,btn-아메리카,active;remove-class,flag-list,on-오세아니아;remove-class,btn-오세아니아,active"
아프리카
#!wiki class="btn btn-아메리카" onclick="toggle-class,flag-list,on-아메리카;toggle-class,btn-아메리카,active;remove-class,flag-list,on-아시아;remove-class,btn-아시아,active;remove-class,flag-list,on-유럽;remove-class,btn-유럽,active;remove-class,flag-list,on-아프리카;remove-class,btn-아프리카,active;remove-class,flag-list,on-오세아니아;remove-class,btn-오세아니아,active"
아메리카
#!wiki class="btn btn-오세아니아" onclick="toggle-class,flag-list,on-오세아니아;toggle-class,btn-오세아니아,active;remove-class,flag-list,on-아시아;remove-class,btn-아시아,active;remove-class,flag-list,on-유럽;remove-class,btn-유럽,active;remove-class,flag-list,on-아프리카;remove-class,btn-아프리카,active;remove-class,flag-list,on-아메리카;remove-class,btn-아메리카,active"
오세아니아
<bgcolor=slategray,darkgray> 색상
(체크박스)
#!wiki class="btn btn-빨강" onclick="toggle-class,flag-list,on-빨강;toggle-class,flag-list,off-빨강;toggle-class,btn-빨강,active"
빨강
#!wiki class="btn btn-파랑" onclick="toggle-class,flag-list,on-파랑;toggle-class,flag-list,off-파랑;toggle-class,btn-파랑,active"
파랑
#!wiki class="btn btn-노랑" onclick="toggle-class,flag-list,on-노랑;toggle-class,flag-list,off-노랑;toggle-class,btn-노랑,active"
노랑
#!wiki class="btn btn-검정" onclick="toggle-class,flag-list,on-검정;toggle-class,flag-list,off-검정;toggle-class,btn-검정,active"
검정
#!wiki class="card 대륙-아시아 색상-빨강파랑검정"
[[대한민국|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:대한민국 국기.svg|height=40]]}}}[br]'''대한민국'''[br]{{{-2 아시아[br]빨강·파랑·검정}}}
}}}]]
#!wiki class="card 대륙-아시아 색상-빨강"
[[일본|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:일본 국기.svg|height=40]]}}}[br]'''일본'''[br]{{{-2 아시아[br]빨강}}}
}}}]]
#!wiki class="card 대륙-아시아 색상-빨강노랑"
[[중국|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:중국 국기.svg|height=40]]}}}[br]'''중국'''[br]{{{-2 아시아[br]빨강·노랑}}}
}}}]]
#!wiki class="card 대륙-아시아 색상-없음"
[[파키스탄|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:파키스탄 국기.svg|height=40]]}}}[br]'''파키스탄'''[br]{{{-2 아시아[br]해당 없음}}}
}}}]]
#!wiki class="card 대륙-유럽 색상-빨강파랑"
[[프랑스|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:프랑스 국기.svg|height=40]]}}}[br]'''프랑스'''[br]{{{-2 유럽[br]빨강·파랑}}}
}}}]]
#!wiki class="card 대륙-유럽 색상-파랑"
[[그리스|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:그리스 국기.svg|height=40]]}}}[br]'''그리스'''[br]{{{-2 유럽[br]파랑}}}
}}}]]
#!wiki class="card 대륙-유럽 색상-빨강노랑검정"
[[독일|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:독일 국기.svg|height=40]]}}}[br]'''독일'''[br]{{{-2 유럽[br]빨강·노랑·검정}}}
}}}]]
#!wiki class="card 대륙-유럽 색상-빨강검정"
[[알바니아|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:알바니아 국기.svg|height=40]]}}}[br]'''알바니아'''[br]{{{-2 유럽[br]빨강·검정}}}
}}}]]
#!wiki class="card 대륙-아프리카 색상-빨강파랑노랑검정"
[[남아프리카 공화국|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:남아프리카 공화국 국기.svg|height=40]]}}}[br]'''남아프리카 공화국'''[br]{{{-2 아프리카[br]빨강·파랑·노랑·검정}}}
}}}]]
#!wiki class="card 대륙-아프리카 색상-빨강검정"
[[케냐|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:케냐 국기.svg|height=40]]}}}[br]'''케냐'''[br]{{{-2 아프리카[br]빨강·검정}}}
}}}]]
#!wiki class="card 대륙-아프리카 색상-빨강노랑검정"
[[가나|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:가나 국기.svg|height=40]]}}}[br]'''가나'''[br]{{{-2 아프리카[br]빨강·노랑·검정}}}
}}}]]
#!wiki class="card 대륙-아프리카 색상-없음"
[[나이지리아|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:나이지리아 국기.svg|height=40]]}}}[br]'''나이지리아'''[br]{{{-2 아프리카[br]해당 없음}}}
}}}]]
#!wiki class="card 대륙-아메리카 색상-빨강파랑"
[[미국|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:미국 국기.svg|height=40]]}}}[br]'''미국'''[br]{{{-2 아메리카[br]빨강·파랑}}}
}}}]]
#!wiki class="card 대륙-아메리카 색상-빨강"
[[캐나다|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:캐나다 국기.svg|height=40]]}}}[br]'''캐나다'''[br]{{{-2 아메리카[br]빨강}}}
}}}]]
#!wiki class="card 대륙-아메리카 색상-노랑검정"
[[자메이카|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:자메이카 국기.svg|height=40]]}}}[br]'''자메이카'''[br]{{{-2 아메리카[br]노랑·검정}}}
}}}]]
#!wiki class="card 대륙-아메리카 색상-빨강파랑노랑"
[[콜롬비아|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:콜롬비아 국기.svg|height=40]]}}}[br]'''콜롬비아'''[br]{{{-2 아메리카[br]빨강·파랑·노랑}}}
}}}]]
#!wiki class="card 대륙-오세아니아 색상-빨강파랑"
[[호주|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:호주 국기.svg|height=40]]}}}[br]'''호주'''[br]{{{-2 오세아니아[br]빨강·파랑}}}
}}}]]
#!wiki class="card 대륙-오세아니아 색상-빨강노랑검정"
[[파푸아뉴기니|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:파푸아뉴기니 국기.svg|height=40]]}}}[br]'''파푸아뉴기니'''[br]{{{-2 오세아니아[br]빨강·노랑·검정}}}
}}}]]
#!wiki class="card 대륙-오세아니아 색상-빨강"
[[통가|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:통가 국기.svg|height=40]]}}}[br]'''통가'''[br]{{{-2 오세아니아[br]빨강}}}
}}}]]
#!wiki class="card 대륙-오세아니아 색상-파랑노랑"
[[팔라우|{{{#!wiki class="card-st"
{{{#!wiki class="card-img"
[[파일:팔라우 국기.svg|height=40]]}}}[br]'''팔라우'''[br]{{{-2 오세아니아[br]파랑·노랑}}}
}}}]]
#!wiki class="card-spacer"
#!wiki class="card-spacer"
#!wiki class="card-spacer"
#!wiki class="card-spacer"
#!wiki class="card-spacer"
#!wiki class="card-spacer"
#!wiki class="card-spacer"
#!wiki class="card-spacer"
}}} ||

3.6. \#!wiki tag="" 구문

{{{#!wiki }}} 구문의 속성으로
#!wiki class="code"
{{{tag}}}
를 선언하면, 해당 구문이
#!wiki class="code"
{{{tag}}}
에 해당하는 HTML 요소로 출력됩니다.
#!wiki class="code"
{{{tag}}}
속성의 값으로는
#!wiki class="code"
{{{span}}}
과
#!wiki class="code"
{{{a}}}
가 허용됩니다.
입력 출력
\
이 구문은 태그로 취급되므로,
inline(내용만큼 차지) 요소로 출력됩니다.\

\
비교: 태그가 없으면 block(줄 차지) 요소인 <div>로 출력됩니다.\
이 구문은 태그로 취급되므로,
inline(내용만큼 차지) 요소로 출력됩니다.

비교: 태그가 없으면 block(줄 차지) 요소인 <div>로 출력됩니다.
\
이 구문은 태그로 취급되므로, inline 링크처럼 출력됩니다.\
이 구문은 태그로 취급되므로, inline 링크처럼 출력됩니다.

#!wiki class="code"
{{{tag}}}
속성으로 지정한 태그도 #!style 구문에서 선택자로 지정할 수 있습니다.
입력 출력
\
#!style
.i-have-span > span{font-weight: bold; font-style: italic;}
\
\
#!wiki class="i-have-span"
\{{{#!wiki tag="span"
여기에 서식이 적용됩니다.
\}}}
\
#!style
.i-have-span > span{font-weight: bold; font-style: italic;}
#!wiki class="i-have-span"
{{{#!wiki tag="span"
여기에 서식이 적용됩니다.
}}}

#!style
.code { display: inline-block; padding: 0 .25rem; background: #bfe9d5; border-radius: .5rem; font-size: .875rem; }
@theseed-dark-mode {
  .code { background: #383b40; }
}

4. 스니펫 문서와 그 응용

파일:다른 뜻 아이콘.svg  
#!if 넘어옴1 != null
''''''{{{#!if 넘어옴2 == null
{{{#!if 넘어옴1[넘어옴1.length - 1] >= 0xAC00 && 넘어옴1[넘어옴1.length - 1] <= 0xD7A3
{{{#!if ((넘어옴1[넘어옴1.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴1[넘어옴1.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴1[넘어옴1.length - 1] < 0xAC00 || 넘어옴1[넘어옴1.length - 1] > 0xD7A3
은(는)}}}}}}{{{#!if 넘어옴2 != null
, ''''''{{{#!if 넘어옴3 == null
{{{#!if 넘어옴2[넘어옴2.length - 1] >= 0xAC00 && 넘어옴2[넘어옴2.length - 1] <= 0xD7A3
{{{#!if ((넘어옴2[넘어옴2.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴2[넘어옴2.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴2[넘어옴2.length - 1] < 0xAC00 || 넘어옴2[넘어옴2.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴3 != null
, ''''''{{{#!if 넘어옴4 == null
{{{#!if 넘어옴3[넘어옴3.length - 1] >= 0xAC00 && 넘어옴3[넘어옴3.length - 1] <= 0xD7A3
{{{#!if ((넘어옴3[넘어옴3.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴3[넘어옴3.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴3[넘어옴3.length - 1] < 0xAC00 || 넘어옴3[넘어옴3.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴4 != null
, ''''''{{{#!if 넘어옴5 == null
{{{#!if 넘어옴4[넘어옴4.length - 1] >= 0xAC00 && 넘어옴4[넘어옴4.length - 1] <= 0xD7A3
{{{#!if ((넘어옴4[넘어옴4.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴4[넘어옴4.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴4[넘어옴4.length - 1] < 0xAC00 || 넘어옴4[넘어옴4.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴5 != null
, ''''''{{{#!if 넘어옴6 == null
{{{#!if 넘어옴5[넘어옴5.length - 1] >= 0xAC00 && 넘어옴5[넘어옴5.length - 1] <= 0xD7A3
{{{#!if ((넘어옴5[넘어옴5.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴5[넘어옴5.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴5[넘어옴5.length - 1] < 0xAC00 || 넘어옴5[넘어옴5.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴6 != null
, ''''''{{{#!if 넘어옴7 == null
{{{#!if 넘어옴6[넘어옴6.length - 1] >= 0xAC00 && 넘어옴6[넘어옴6.length - 1] <= 0xD7A3
{{{#!if ((넘어옴6[넘어옴6.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴6[넘어옴6.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴6[넘어옴6.length - 1] < 0xAC00 || 넘어옴6[넘어옴6.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴7 != null
, ''''''{{{#!if 넘어옴8 == null
{{{#!if 넘어옴7[넘어옴7.length - 1] >= 0xAC00 && 넘어옴7[넘어옴7.length - 1] <= 0xD7A3
{{{#!if ((넘어옴7[넘어옴7.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴7[넘어옴7.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴7[넘어옴7.length - 1] < 0xAC00 || 넘어옴7[넘어옴7.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴8 != null
, ''''''{{{#!if 넘어옴9 == null
{{{#!if 넘어옴8[넘어옴8.length - 1] >= 0xAC00 && 넘어옴8[넘어옴8.length - 1] <= 0xD7A3
{{{#!if ((넘어옴8[넘어옴8.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴8[넘어옴8.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴8[넘어옴8.length - 1] < 0xAC00 || 넘어옴8[넘어옴8.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴9 != null
, ''''''{{{#!if 넘어옴10 == null
{{{#!if 넘어옴9[넘어옴9.length - 1] >= 0xAC00 && 넘어옴9[넘어옴9.length - 1] <= 0xD7A3
{{{#!if ((넘어옴9[넘어옴9.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴9[넘어옴9.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴9[넘어옴9.length - 1] < 0xAC00 || 넘어옴9[넘어옴9.length - 1] > 0xD7A3
은(는)}}}}}}}}}{{{#!if 넘어옴10 != null
, ''''''{{{#!if 넘어옴10[넘어옴10.length - 1] >= 0xAC00 && 넘어옴10[넘어옴10.length - 1] <= 0xD7A3
{{{#!if ((넘어옴10[넘어옴10.length - 1] - 0xAC00) % 28) == 0
는}}}{{{#!if ((넘어옴10[넘어옴10.length - 1] - 0xAC00) % 28) != 0
은}}}}}}{{{#!if 넘어옴10[넘어옴10.length - 1] < 0xAC00 || 넘어옴10[넘어옴10.length - 1] > 0xD7A3
은(는)}}}}}} 여기로 연결됩니다. 
#!if 설명 == null && 리스트 == null
{{{#!if 설명1 == null
다른 뜻에 대한 내용은 아래 문서를}}}{{{#!if 설명1 != null
{{{#!html 나무위키에 존재하는 스니펫 목록}}}에 대한 내용은 [[나무위키:스니펫]] 문서{{{#!if (문단1 == null) == (앵커1 == null)
를}}}{{{#!if 문단1 != null & 앵커1 == null
의 [[나무위키:스니펫#s-|]]번 문단을}}}{{{#!if 문단1 == null & 앵커1 != null
의 [[나무위키:스니펫#|]] 부분을}}}}}}{{{#!if 설명2 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단2 == null) == (앵커2 == null)
를}}}{{{#!if 문단2 != null & 앵커2 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단2 == null & 앵커2 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명3 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단3 == null) == (앵커3 == null)
를}}}{{{#!if 문단3 != null & 앵커3 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단3 == null & 앵커3 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명4 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단4 == null) == (앵커4 == null)
를}}}{{{#!if 문단4 != null & 앵커4 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단4 == null & 앵커4 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명5 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단5 == null) == (앵커5 == null)
를}}}{{{#!if 문단5 != null & 앵커5 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단5 == null & 앵커5 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명6 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단6 == null) == (앵커6 == null)
를}}}{{{#!if 문단6 != null & 앵커6 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단6 == null & 앵커6 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명7 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단7 == null) == (앵커7 == null)
를}}}{{{#!if 문단7 != null & 앵커7 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단7 == null & 앵커7 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명8 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단8 == null) == (앵커8 == null)
를}}}{{{#!if 문단8 != null & 앵커8 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단8 == null & 앵커8 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명9 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단9 == null) == (앵커9 == null)
를}}}{{{#!if 문단9 != null & 앵커9 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단9 == null & 앵커9 != null
의 [[#|]] 부분을}}}}}}{{{#!if 설명10 != null
, {{{#!html }}}에 대한 내용은 [[]] 문서{{{#!if (문단10 == null) == (앵커10 == null)
를}}}{{{#!if 문단10 != null & 앵커10 == null
의 [[#s-|]]번 문단을}}}{{{#!if 문단10 == null & 앵커10 != null
의 [[#|]] 부분을}}}}}}
#!if 설명 == null
{{{#!if 리스트 != null
다른 뜻에 대한 내용은 아래 문서를}}} 참고하십시오.

#!if 리스트 != null
{{{#!if 문서명1 != null
 * {{{#!if 설명1 != null
나무위키에 존재하는 스니펫 목록: }}}[[나무위키:스니펫]] {{{#!if 문단1 != null & 앵커1 == null
문서의 [[나무위키:스니펫#s-|]]번 문단}}}{{{#!if 문단1 == null & 앵커1 != null
문서의 [[나무위키:스니펫#|]] 부분}}}}}}{{{#!if 문서명2 != null
 * {{{#!if 설명2 != null
: }}}[[]] {{{#!if 문단2 != null & 앵커2 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단2 == null & 앵커2 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명3 != null
 * {{{#!if 설명3 != null
: }}}[[]] {{{#!if 문단3 != null & 앵커3 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단3 == null & 앵커3 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명4 != null
 * {{{#!if 설명4 != null
: }}}[[]] {{{#!if 문단4 != null & 앵커4 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단4 == null & 앵커4 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명5 != null
 * {{{#!if 설명5 != null
: }}}[[]] {{{#!if 문단5 != null & 앵커5 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단5 == null & 앵커5 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명6 != null
 * {{{#!if 설명6 != null
: }}}[[]] {{{#!if 문단6 != null & 앵커6 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단6 == null & 앵커6 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명7 != null
 * {{{#!if 설명7 != null
: }}}[[]] {{{#!if 문단7 != null & 앵커7 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단7 == null & 앵커7 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명8 != null
 * {{{#!if 설명8 != null
: }}}[[]] {{{#!if 문단8 != null & 앵커8 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단8 == null & 앵커8 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명9 != null
 * {{{#!if 설명9 != null
: }}}[[]] {{{#!if 문단9 != null & 앵커9 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단9 == null & 앵커9 != null
문서의 [[#|]] 부분}}}}}}{{{#!if 문서명10 != null
 * {{{#!if 설명10 != null
: }}}[[]] {{{#!if 문단10 != null & 앵커10 == null
문서의 [[#s-|]]번 문단}}}{{{#!if 문단10 == null & 앵커10 != null
문서의 [[#|]] 부분}}}}}}

스니펫은 스니펫:으로 시작하는 문서로, CSS 설정을 저장할 수 있는 문서입니다. 문서 안에는 상기 style 구문을 입력하여 문서 안에 미리 선택자(class)의 이름과 그 스타일 속성(CSS 속성)을 저장할 수 있습니다. 이렇게 저장된 선택자의 이름과 그 속성은, 같이 적용하고 싶은 문서 하나하나마다 style 문법을 쓰지 않고도 해당 스니펫을 불러옴으로써 여러 문서에 적용할 수 있습니다.

필요하다면 문서 안에 불러온 스니펫에 저장되어 있던 속성을 기반(base)으로, 스니펫에 저장된 선택자(class) 이름을 문서 내에 별도로 만든 style 구문 안에 입력함으로써 스니펫으로 불러온 선택자에 추가적인 속성을 개별적으로 꾸며볼(customizing) 수 있습니다.

참고: 스니펫 문서 관련 기능은 업데이트가 계속 이루어지고 있으므로 본 도움말에 설명하는 내용과 다른 업데이트가 적용될 수 있습니다.

4.1. 스니펫 문서의 구성

#!style
.nopadclear {background:transparent};.nopadclear tbody{border:transparent;}; .nopadclear tbody td {border:transparent; padding: 0}; .fontmono {font-family: monospace}; 
||<tableclass=nopadclear>CSS 스타일
선언 부분 ||<width=20px> ||<class=fontmono>선택자 { (스타일 속성) : (스타일 값) }
....
/*
....
선택자 { (스타일 속성) : (스타일 값) }

\ ||
구분자 <class=fontmono>---
나무마크
입력 부분
<class=fontmono>
\
내용

스니펫 문서는 크게 CSS 스타일을 선언하는 부분과 나무마크를 입력할 수 있는 부분으로 구성됩니다. 이 두 부분의 경계선을 표시하려면 구문으로서 수평줄 구문처럼 좌우 공백 없이 - 3개를 입력해야 합니다.

나무마크 입력 부분에는 [[분류:스니펫]]을 입력하여 해당 스니펫 문서를 분류:스니펫 분류에 배속시켜야 합니다.

참고: 스니펫 안에 문단 구문을 생성할 수 있으나, 문단 편집으로 편집할 시 올바른 문단(section)을 불러오지 않는 버그가 있을 수 있습니다. 이럴 때는 문단 편집이 아닌 문서 전체 편집으로 편집하시기 바랍니다.

4.2. 스니펫 호출과 그 응용

문서에 이미지 파일을 삽입하는 기본 문법처럼 [[스니펫:이름.css]] 구문을 입력하면 스니펫에 저장해놓은 선택자들과 그 속성을 문서에 불러옵니다. 이렇게 불러온 스니펫을 참고하여 표 구문이나 wiki 등 필요한 곳의 CSS 속성을 적당한 속성이 입력된 선택자 이름을 입력할 수 있습니다. 적당한 스니펫 몇 개를 문서에 삽입하는 것만으로도 문서 내에 직접 style 구문을 작성하지 않고 CSS 속성을 적용해볼 수 있습니다.

물론 불러온 스니펫의 선택자(class) 속성을 추가하는 style 문법을 별도로 입력하여 문서 안에서 불러온 선택자를 꾸며볼 수 있습니다.
이를테면 [[스니펫:A.css]]에 b라는 선택자(class)가 있고 다음과 같이 b에 배경(background-color) 속성만 적용되어 있다고 해봅시다.
{{{#!wiki style="font-family: monospace"
.b {background-color: light-dark(white, gray)} }}}

그리고 다음 예시 처럼 어느 문서 안에 이 스니펫([[스니펫:A.css]])을 불러온 다음 style을 입력하여 불러온 b 선택자에 글자색 속성을 부여할 수 있습니다. 이렇게 되면 이 문서 안에서는 b 선택자가 배경(background-color) 속성과 글자색(color) 속성을 가지게 됩니다.
{{{#!wiki style="font-family: monospace"
\스니펫:A.css\
#!style
.b \{color: #00a495} \
}}}

이처럼 다른 문서마다 스니펫을 호출한 다음 추가적인 style 구문을 입력하여 같은 선택자(class) 이름을 두고 스니펫의 CSS를 기반한 문서만의 스타일을 만들어볼 수 있습니다.

만일 어떤 선택자(class) 이름으로 CSS를 적용했으나 의도하지 않은 속성이 적용되었다면 다음 3가지 중 하나의 상황입니다.
  1. 다른 문단 등 문서 어딘가에 해당 선택자(class) 이름으로 설정된 스니펫 또는 style 구문이 적용된 것입니다. 이럴 때는 해당 스니펫이나 style을 찾아 수정하셔야 합니다.
  2. 문서 내 style과 스니펫, 또는 스니펫과 다른 스니펫 사이 등 두 개 이상의 설정에서 설정된 선택자(class) 속성이 서로 중첩/충돌되는 상황입니다. 이럴 때는 불러온 스니펫이나 문서 내 style구문 안에 같은 이름의 선택자(class)가 있는지 찾아본 다음 수정하셔야 합니다.
  3. 불러온 스니펫 안의 CSS 구문 또는 문서 내 style 구문 어딘가가 오류가 나서 불러온 스니펫이 정상적으로 동작하지 않고 있는 것입니다. 수식 구문처럼 한 자라도 오류가 나면 스니펫, style 구문 전체가 깨지므로 스니펫, style 구문 안에 깨진 곳이 있는지 확인해보셔야 합니다.

[1] 반드시 단위를 붙일 것.[2] 원래는 그냥 튀어 나왔으나, 2019년 10월 말 경부터 변경.[3] 글자 크기를 세밀하게 조정. {\{{+? }}\}나 {\{{-? }}\}과는 별개의 수치로 지정되며 소숫점도 가능합니다. 심지어 0까지도 조정 가능해 글자를 숨겨버릴 수도 있습니다. <length> 단위도 사용할 수 있습니다.