text-stroke-width 속성
text-stroke-width 속성은 텍스트 문자의 윤곽선 또는 윤곽선의 두께를 지정합니다.
이 속성은 px, em, rem 등의 크기 단위로 지정된 값을 취합니다.
또한 다음 값을 지정할 수 있습니다: thin (얇은 선),
medium (중간 선) 및 thick
(두꺼운 선).
구문
선택자 {
text-stroke-width: 숫자 또는 thin 또는 medium 또는 thick;
}
예제
텍스트에 얇은 윤곽선을 지정해 보겠습니다:
<p>
Text
</p>
body {
width: 100px;
height: 50px;
}
p {
-webkit-text-stroke-color: orange;
-webkit-text-stroke-width: thin;
text-stroke-width: thin;
color: white;
font-size: 10em;
margin-top: 0;
font-weight: bold;
font-family: Arial;
}
:
예제
이제 얇은 윤곽선을 중간 윤곽선으로 변경해 보겠습니다:
<p>
Text
</p>
body {
width: 100px;
height: 50px;
}
p {
-webkit-text-stroke-color: orange;
-webkit-text-stroke-width: medium;
text-stroke-width: medium;
color: white;
font-size: 10em;
margin-top: 0;
font-weight: bold;
font-family: Arial;
}
:
예제
텍스트에 두꺼운 윤곽선을 지정해 보겠습니다:
<p>
Text
</p>
body {
width: 100px;
height: 50px;
}
p {
-webkit-text-stroke-color: orange;
-webkit-text-stroke-width: thick;
text-stroke-width: thick;
color: white;
font-size: 10em;
margin-top: 0;
font-weight: bold;
font-family: Arial;
}
:
예제
또한 텍스트에 2px 두께의 윤곽선을 지정해 보겠습니다:
<p>
Text
</p>
body {
width: 100px;
height: 50px;
}
p {
-webkit-text-stroke-color: orange;
-webkit-text-stroke-width: 2px;
color: white;
font-size: 10em;
margin-top: 0;
font-weight: bold;
font-family: Arial;
}
:
함께 보기
-
텍스트 윤곽선을 지정하는 속성
text-stroke, -
텍스트 윤곽선 색상을 지정하는 속성
text-stroke-color,