Created
July 27, 2019 01:49
-
-
Save yheihei/c963b98c810101341299b980b09dc32a to your computer and use it in GitHub Desktop.
Good CSS design
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
<div id="blog-post"> | |
<h2>今日の日記</h2> | |
<p>本文本文本文</p> | |
<a href="" class="button button--primary">続きを読む</a> | |
</div> | |
<h2>ブログ一覧</h2> | |
<div id="blog-archives"> | |
<h3>昨日の日記</h3> | |
<p>本文本文本文...</p> | |
<a href="" class="button button--secondary">続きを読む</a> | |
<h3>一昨日の日記</h3> | |
<p>本文本文本文...</p> | |
<a href="" class="button button--secondary">続きを読む</a> | |
</div> |
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
a.button { | |
display:inline-block; | |
padding: 0.5rem 1rem; | |
text-decoration:none; | |
border-radius: 4px; | |
font-weight:bold; | |
} | |
.button--primary { | |
background-color: #007bff; | |
color: white; | |
} | |
.button--secondary { | |
background-color: red; | |
color: white; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment