Tingkatan Basic
Tag HTML yang dipakai untuk membuat bullets adalah <ul> dan
numbering adalah <ol>. Setiap list-item yang ditampilkan
menggunakan tag <li>. Contoh:
Mengganti Style bullets & numbering:
1. Contoh Numbering menjadi alphabet kecil (lower-alpha):
code:
Perhatikan bahwa perintah yang dipergunakan adalah list-style: jenis-style;
Jenis predefined style / style bawaan yang bisa dipakai adalah:
2. Contoh Bullets:
code:
Perhatikan bahwa perintah yang dipergunakan adalah list-style: jenis-style;
Jenis predefined style / style bawaan yang bisa dipakai adalah:
3. Special Character Selain ketiga predefined style yang diatas bisa menggunakan HTML special character seperti yang ada di sini.
Code HTML:
Code CSS:
4. Custom numbering style
Code HTML:
Code CSS:
|
|
|
|
Mengganti Style bullets & numbering:
1. Contoh Numbering menjadi alphabet kecil (lower-alpha):
- Nomor 1
- Nomor 2
- Nomor 3
code:
<ol style="list-style: lower-alpha;">
<li>Nomor 1</li>
<li>Nomor 2</li>
<li>Nomor 3</li>
</ol>
Perhatikan bahwa perintah yang dipergunakan adalah list-style: jenis-style;
Jenis predefined style / style bawaan yang bisa dipakai adalah:
- lower-alpha >> a b c
- upper-alpha >> A B C
- lower-roman >> i ii iii
- upper-roman >> I II III
- decimal >> 1 2 3
- decimal-leading-zero >> 01 02 03
2. Contoh Bullets:
- Bullets 1
- Bullets 2
- Bullets 3
code:
<ul style="list-style: square;">
<li>Bullets 1</li>
<li>Bullets 2</li>
<li>Bullets 3</li>
</ul>
Perhatikan bahwa perintah yang dipergunakan adalah list-style: jenis-style;
Jenis predefined style / style bawaan yang bisa dipakai adalah:
- square
- disc
- circle
3. Special Character Selain ketiga predefined style yang diatas bisa menggunakan HTML special character seperti yang ada di sini.
- Bullets 1
- Bullets 2
- Bullets 3
<div class="contohnumbering">
<ul>
<li>Bullets 1</li>
<li>Bullets 2</li>
<li>Bullets 3</li>
</ul>
</div>
div.contohnumbering ul {
list-style: none;
padding-left: 0;
}
div.contohnumbering ul li:before {
content: " \2708 ";
color: #fd3;
background-color: #000;
padding: 4px;
}
div.contohnumbering ul li {
margin-bottom: 8px;
margin-right: 8px;
}
4. Custom numbering style
- Nomor 1
- Nomor 2
- Nomor 3
<div class="contohnumbering">
<ol>
<li>Nomor 1</li>
<li>Nomor 2</li>
<li>Nomor 3</li>
</ol>
</div>
div.contohnumbering ol {
counter-reset: item;
}
div.contohnumbering ol li {
list-style: none;
padding-left: 0px;
font-size: 11px;
position: relative;
left: 42px;
margin-bottom: 8px;
}
div.contohnumbering ol li:before {
display: inline-block;
border-radius: 4px;
background-color: #000;
color: #fff;
width: 24px;
text-align: center;
counter-increment: item;
content: counter(item,decimal-leading-zero);
position: absolute;
left: -36px;
}
0 Response to "Custom HTML Bullets & Numbering"
Posting Komentar