表に色をつけるCSS編集

テーマ「Liquorice」の表(テーブル)に色をつける方法についての覚書です。


テーマ「Liquorice」に以下のCSSを追加すると表に色がつきます。

.hentry tr:nth-child(2n+1) td,.entry tr:nth-child(2n+1) td {
background-attachment:scroll;
background-color:#f9f4ed;
background-image:none;
background-position:0 0;
background-repeat:repeat;
}

.hentry td,.entry td {
background-attachment:scroll;
background-color:#fbf8f4;
background-image:none;
background-position:0 0;
background-repeat:repeat;
border-bottom-color:#DADADA;
border-bottom-style:solid;
border-bottom-width:1px;
}

.hentry tr:hover td,.entry tr:hover td {
background-attachment:scroll;
background-color:#e2dbd1;
background-image:none;
background-position:0 0;
background-repeat:repeat;
}

参考:CSS3 :nth-child() Selector|W3Schools

 

以下に詳細を記入するか、アイコンをクリックしてログインしてください。

WordPress.com ロゴ

WordPress.com アカウントを使ってコメントしています。 ログアウト / 変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト / 変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト / 変更 )

%s と連携中