状態:-
閲覧数:1,512
投稿日:2017-11-16
更新日:2017-12-27
テーブル
リスト
<style>
tr:nth-child(5n+1){
background-color: #ffebee;
border-bottom: 1px solid #f44336;
}
tr:nth-child(5n+2){
background-color: #E3F2FD;
border-bottom: 1px solid #2196F3;
}
tr:nth-child(5n+3){
background-color: #E8F5E9;
border-bottom: 1px solid #4CAF50;
}
tr:nth-child(5n+4){
background-color: #FFF3E0;
border-bottom: 1px solid #FF9800;
}
tr:nth-child(5n){
background-color: #F5F5F5;
border-bottom: 1px solid #9E9E9E;
}
</style>
リスト
<style>
li:nth-child(5n+1){
background-color: #ffebee;
border-bottom: 1px solid #f44336;
}
li:nth-child(5n+2){
background-color: #E3F2FD;
border-bottom: 1px solid #2196F3;
}
li:nth-child(5n+3){
background-color: #E8F5E9;
border-bottom: 1px solid #4CAF50;
}
li:nth-child(5n+4){
background-color: #FFF3E0;
border-bottom: 1px solid #FF9800;
}
li:nth-child(5n){
background-color: #F5F5F5;
border-bottom: 1px solid #9E9E9E;
}
</style>