Instantly share code, notes, and snippets.
Created
April 16, 2016 14:11
-
Save aloerina01/0b8e5cbb5baa642ae3ae39c2778ecbf1 to your computer and use it in GitHub Desktop.
はてなブログのフォローボタン。コピペ用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
.display-none { | |
display: none !important; | |
} | |
.follow-buttons { | |
display: flex; | |
justify-content: space-around; | |
align-items: center; | |
position: relative; | |
width: 100%; | |
} | |
.follow-buttons .follow-button { | |
position: relative; | |
width: 25%; | |
max-width: 65px; | |
min-width: 54px; | |
} | |
.follow-buttons .follow-button:before { | |
padding-top: 100%; | |
display: block; | |
content: ""; | |
} | |
.follow-buttons .follow-button-inner { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
text-align: center; | |
border: 2px solid #7f7f7f; | |
border-radius: 50%; | |
transition: all 0.4s ease; | |
cursor: pointer; | |
} | |
.follow-buttons .follow-button-inner .icon { | |
font-size: 32px; | |
} | |
.follow-buttons .follow-button-inner-blog { | |
border-color: #78909c; | |
color: #78909c; | |
background-color: #ffffff; | |
} | |
.follow-buttons .follow-button-inner-blog:hover { | |
background-color: #78909c; | |
color: #ffffff; | |
} | |
.follow-buttons .follow-button-inner-twitter { | |
border-color: #29b6f6; | |
color: #29b6f6; | |
background-color: #ffffff; | |
} | |
.follow-buttons .follow-button-inner-twitter:hover { | |
background-color: #29b6f6; | |
color: #ffffff; | |
} | |
.follow-buttons .follow-button-inner-github { | |
border-color: #B083DF; | |
color: #B083DF; | |
background-color: #ffffff; | |
} | |
.follow-buttons .follow-button-inner-github:hover { | |
background-color: #B083DF; | |
color: #ffffff; | |
} | |
.follow-buttons .follow-button-inner-feedly { | |
border-color: #66bb6a; | |
color: #66bb6a; | |
background-color: #ffffff; | |
} | |
.follow-buttons .follow-button-inner-feedly:hover { | |
background-color: #66bb6a; | |
color: #ffffff; | |
} | |
.follow-buttons .follow-button-inner .tooltip { | |
display: none; | |
position: absolute; | |
width: 100px; | |
left: 50%; | |
top: 110%; | |
opacity: 0; | |
background-color: #263238; | |
color: #ffffff; | |
font-size: 0.6rem; | |
text-align: center; | |
border-radius: 4px; | |
padding: 6px; | |
-webkit-transform: translate(-50%, 0); | |
-moz-transform: translate(-50%, 0); | |
-ms-transform: translate(-50%, 0); | |
-o-transform: translate(-50%, 0); | |
transform: translate(-50%, 0); | |
} | |
.follow-buttons .follow-button-inner:hover .tooltip { | |
display: block; | |
animation-name: fade-in; | |
-moz-animation-name: fade-in; | |
-webkit-animation-name: fade-in; | |
animation-duration: 0.4s; | |
animation-delay: 0.4s; | |
-moz-animation-duration: 0.4s; | |
-moz-animation-delay: 0.4s; | |
-webkit-animation-duration: 0.4s; | |
-webkit-animation-delay: 0.4s; | |
animation-fill-mode: forwards; | |
-moz-animation-fill-mode: forwards; | |
-webkit-animation-fill-mode: forwards; | |
} | |
@keyframes fade-in { | |
0% { | |
display: none; | |
opacity: 0; | |
} | |
1% { | |
display: block; | |
opacity: 0; | |
} | |
100% { | |
display: block; | |
opacity: 1; | |
} | |
} | |
@-moz-keyframes fade-in { | |
0% { | |
display: none; | |
opacity: 0; | |
} | |
1% { | |
display: block; | |
opacity: 0; | |
} | |
100% { | |
display: block; | |
opacity: 1; | |
} | |
} | |
@-webkit-keyframes fade-in { | |
0% { | |
display: none; | |
opacity: 0; | |
} | |
1% { | |
display: block; | |
opacity: 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment