Last active
May 4, 2016 15:35
-
-
Save aloerina01/6a080ac17b6492cd3dc75ceb49163bdd to your computer and use it in GitHub Desktop.
CSSの設計 CSSをあてる単位を意識したclass設計
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.row { | |
height: 20px; | |
} | |
.row-header { | |
background-color: #1A237E; | |
color: #fff; | |
} | |
.col-mail { | |
width: 120px; | |
} | |
/* こんな感じにピンポイントでCSSを当てやすい! */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table> | |
<tr class="row row-header"> | |
<th class="cell cell-header col-no">No</th> | |
<th class="cell cell-header col-name">名前</th> | |
<th class="cell cell-header col-mail">メールアドレス</th> | |
</tr> | |
<tr class="row row-body odd"> | |
<td class="cell cell-body col-no">1</td> | |
<td class="cell cell-body col-name">Hoge</td> | |
<td class="cell cell-body col-mail">hoge@mail.com</td> | |
</tr> | |
<tr class="row row-body even"> | |
<td class="cell cell-body col-no">2</td> | |
<td class="cell cell-body col-name">Huga</td> | |
<td class="cell cell-body col-mail">huga@mail.com</td> | |
</tr> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment