Belajar CSS Even Odd


Cahya Dyazin - Even Odd adalah sebuah metode atau cara di CSS (cascading style sheets) untuk membuat pariasi background di tabel, metode Even Odd sering di sebut juga sebagai metode zebra stripes atau garis-garis zebra ,karena metode ini menggunakan dua warna yang saling berselingan. Contoh penerapan Even Odd css di html :
<html>
<style>
tr#baris:nth-child(even) {background: #FFFFFF; border:0px solid #80C8FE;}
tr#baris:nth-child(odd) {background: #BFE3FE; border:0px solid #80C8FE;}
</style>
<body>
<table>
<tr id="baris">
<td>1.</td><td>Cahya</td><td>Sangat Baik</td>
</tr>
<tr id="baris">
<td>2.</td><td>Dyazin</td><td>Baik</td>
</tr>
<tr id="baris">
<td>3.</td><td>Ririn</td><td>Cukup</td>
</tr>
<tr id="baris">
<td>4.</td><td>Bahi</td><td>Cukup</td>
</tr>
</table>
</body>
</html>












0/Post a Comment/Comments

Lebih baru Lebih lama