aboutsummaryrefslogtreecommitdiff
path: root/files/pl/web/css/font-weight/index.html
blob: 8e4779355bbc4e1ccddbdb63d54431c078d86f42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
title: font-weight
slug: Web/CSS/font-weight
tags:
  - CSS
  - 'CSS:Dokumentacje'
  - Dokumentacje
  - Wszystkie_kategorie
translation_of: Web/CSS/font-weight
---
<p>{{ CSSRef() }}</p>

<h2 id="Podsumowanie" name="Podsumowanie">Podsumowanie</h2>

<p>Własność {{ Cssxref("font-weight") }} określa wagę lub grubość czcionki.</p>

<p>{{cssinfo}}</p>

<h2 id="Sk.C5.82adnia" name="Sk.C5.82adnia">Składnia</h2>

<p><code>font-weight:</code> <code>normal</code> | <code>bold</code> | <code>bolder</code> | <code>lighter</code> | <code>100</code> | <code>200</code> | <code>300</code> | <code>400</code> | <code>500</code> | <code>600</code> | <code>700</code> | <code>800</code> | <code>900</code> | {{ Cssxref("inherit") }}</p>

<h3 id="Warto.C5.9Bci" name="Warto.C5.9Bci">Wartości</h3>

<dl>
 <dt>normal </dt>
 <dd>Normalna waga czcionki. Identycznie jak 400.</dd>
 <dt>bold </dt>
 <dd>Pogrubiona czcionka. Identycznie jak 700.</dd>
 <dt>lighter </dt>
 <dd>Waga czcionki lżejsza o jedną wartość niż w elemencie rodzica (spośród dostępnych wag czcionki)</dd>
 <dt>bolder </dt>
 <dd>Waga czcionki cięższa o jedną wartość niż w elemencie rodzica (spośród dostępnych wag czcionki)</dd>
 <dt>100, 200, 300, 400, 500, 600, 700, 800, 900 </dt>
 <dd>Liczbowe wartość wag czcionek dla czcionek, które mają więcej niż tylko waga normalna i pogrubiona. Jeśli wybrana waga jest niedostępna, wtedy dla wartości 600-900 używana jest najbliższa dostępna większa wagi (lub jeśli takiej nie ma, najbliższa dostępna lżejsza waga), a dla wartości 100-500 używana jest najbliższa dostępna mniejsza waga (lub jeśli takiej nie ma, najbliższa dostępna większa waga). Oznacza to, że dla czcionek, które mają tylko wagi normalną i pogrubioną, wartości 100-500 stają się wagą normalną, a 600-900 pogrubioną.</dd>
</dl>

<h2 id="Przykłady">Przykłady</h2>

<h3 id="HTML">HTML</h3>

<pre class="brush: html">&lt;p&gt;
  Alice was beginning to get very tired of sitting by her sister on the
  bank, and of having nothing to do: once or twice she had peeped into the
  book her sister was reading, but it had no pictures or conversations in
  it, 'and what is the use of a book,' thought Alice 'without pictures or
  conversations?'
&lt;/p&gt;

&lt;div&gt;I'm heavy&lt;br/&gt;
  &lt;span&gt;I'm lighter&lt;/span&gt;
&lt;/div&gt;
</pre>

<h3 id="CSS">CSS</h3>

<pre class="brush:css">/* Set paragraph text to be bold. */
p {
  font-weight: bold;
}

/* Set div text to two steps darker than
   normal but less than a standard bold. */
div {
 font-weight: 600;
}

/* Sets text enclosed within span tag
   to be one step lighter than the parent. */
span {
  font-weight: lighter;
}</pre>

<h3 id="Result">Result</h3>

<p>{{EmbedLiveSample("Przykłady","400","300")}}</p>

<h2 id="Specyfikacje" name="Specyfikacje">Specyfikacje</h2>

<ul>
 <li><a class="external" href="http://www.w3.org/TR/CSS1#font-weight">CSS 1</a></li>
 <li><a class="external" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight">CSS 2.1</a></li>
 <li><a class="external" href="http://www.w3.org/TR/css3-fonts/#font-weight">css3-fonts</a></li>
</ul>

<h2 id="Zgodno.C5.9B.C4.87_z_przegl.C4.85dark.C4.85" name="Zgodno.C5.9B.C4.87_z_przegl.C4.85dark.C4.85">Zgodność z przeglądarką</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th>Przeglądarka</th>
   <th>Najniższa wersja</th>
  </tr>
  <tr>
   <td>Internet Explorer</td>
   <td>3</td>
  </tr>
  <tr>
   <td>Netscape</td>
   <td>4</td>
  </tr>
  <tr>
   <td>Opera</td>
   <td>3.5</td>
  </tr>
 </tbody>
</table>