Last active
March 22, 2017 19:18
-
-
Save moxdev/8ba53b2e08e9f105fe39f4305fa1711e to your computer and use it in GitHub Desktop.
Round css down-caret button
This file contains hidden or 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.btn { | |
background: #fff; | |
border-radius: 4px; | |
box-shadow: 0 2px 0px 0 rgba(0,0,0,0.25); | |
color: #fff; | |
display: inline-block; | |
padding: 6px 30px 8px; | |
position: relative; | |
text-decoration: none; | |
transition: all 0.1s 0s ease-out; | |
} | |
a.toggle-info { | |
border-radius: 32px; | |
width: 32px; | |
height: 32px; | |
position: absolute; | |
padding: 0; | |
left: 15px; | |
top: 0; | |
span { | |
background: #fff; | |
display: block; | |
height: 2px; | |
position: absolute; | |
top: 16px; | |
transition: all 0.15s 0s ease-out; | |
width: 12px; | |
} | |
span.left { | |
right: 14px; | |
transform: rotate(45deg); | |
} | |
span.right { | |
left: 14px; | |
transform: rotate(-45deg); | |
} | |
} | |
/* HTML | |
<a href="#" class="toggle-info btn"> | |
<span class="left"></span> | |
<span class="right"></span> | |
</a> | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment