יום שני, 13 באפריל 2009

11.4 List-style-type

המאפיין List-style-type משמש לשני תפקידים: במסגרת UL הוא יכול לקבל אחד מהערכים הבאים: disc, circle, square או none. ברירת המחדל disc היא עיגול ממולא, circle הוא עיגול שתוכו ריק ואילו square הוא ריבוע. 
במסגרת OL התכונה יכולה לקבל מספר ערכים: decimal - מספר עשרוני, lower-roman ספרות רומיות קטנות, upper-roman - ספרות רומיות גדולות, lower-alpha - אותיות אנגליות קטנות, upper-alpha - אותיות אנגליות גדולות, או none. 
רוב הדפדפנים מקצים decimal כברירת מחדל.
ניתן גם לכתוב בקיצור list-style ולזרוק לשם ערכים ללא סדר מסויים.

<html>
<head>
<style type="text/css">
ul.disc {list-style-type: disc}
ul.circle {list-style-type: circle}
ul.square {list-style-type: square}
ul.none {list-style-type: none}
</style>
</head>

<body>
<ul class="disc">
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ul>

<ul class="circle">
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ul>

<ul class="square">
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ul>

<ul class="none">
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ul>
</body>

</html> 
הקוד שלמעלה יראה כך בדפדפן:

להלן טבלת הערכים האפשיים למאפיין זה:

Value

Description

none

No marker

disc

Default. The marker is a filled circle

circle

The marker is a circle

square

The marker is a square

decimal

The marker is a number

decimal-leading-zero

The marker is a number padded by initial zeros (01, 02, 03, etc.)

lower-roman

The marker is lower-roman (i, ii, iii, iv, v, etc.)

upper-roman

The marker is upper-roman (I, II, III, IV, V, etc.)

lower-alpha

The marker is lower-alpha (a, b, c, d, e, etc.)

upper-alpha

The marker is upper-alpha (A, B, C, D, E, etc.) 

lower-greek

The marker is lower-greek (alpha, beta, gamma, etc.)

lower-latin

The marker is lower-latin (a, b, c, d, e, etc.)

upper-latin

The marker is upper-latin (A, B, C, D, E, etc.)

hebrew

The marker is traditional Hebrew numbering

armenian

The marker is traditional Armenian numbering

georgian

The marker is traditional Georgian numbering (an, ban, gan, etc.)

cjk-ideographic

The marker is plain ideographic numbers

hiragana

The marker is: a, i, u, e, o, ka, ki, etc.

katakana

The marker is: A, I, U, E, O, KA, KI, etc.

hiragana-iroha

The marker is: i, ro, ha, ni, ho, he, to, etc.

katakana-iroha

The marker is: I, RO, HA, NI, HO, HE, TO, etc.


 הקודם  הבא  

אין תגובות:

הוסף רשומת תגובה