Vlastnosť text-stroke-width
Vlastnosť text-stroke-width nastavuje šírku obrysu
znakov textu alebo jeho obťahovanie. Vlastnosť
prijíma hodnoty uvedené v jednotkách veľkosti
ako px, em, rem atď. Tiež
je možné nastaviť nasledujúce hodnoty: thin (tenká čiara),
medium (stredne hrubá čiara) a thick
(hrubá čiara).
Syntax
selektor {
text-stroke-width: číslo alebo thin alebo medium alebo thick;
}
Príklad
Nastavme znakom nášho textu tenký obrys:
<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;
}
:
Príklad
A teraz zmeňme tenký obrys na stredne hrubý:
<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;
}
:
Príklad
Nastavme znakom nášho textu hrubý obrys:
<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;
}
:
Príklad
Tiež nastavme znakom nášho textu
obrys šírky 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;
}
:
Pozri tiež
-
vlastnosť
text-stroke,
ktorá nastavuje obrys textu -
vlastnosť
text-stroke-color,
ktorá nastavuje farbu obrysu textu