A Pen by Asna Farid on CodePen.
Created
March 24, 2019 08:52
-
-
Save CodeMyUI/80c0df83f11a4558d8f597a2012394f9 to your computer and use it in GitHub Desktop.
Pull-Out Search Bar Concept
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
<!--Copyright - Asna Farid Siddiqui - Vector Tales--> | |
<!--www.twitter.com/asna_farid--> | |
<!--Click on the magnifying glass icon to pull out --> | |
<a href="#"></a> | |
<i>Pull-Out Search Bar Concept<i> |
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
@import "compass"; | |
@import "compass/css3"; | |
@import url(https://fonts.googleapis.com/css?family=Exo+2:400,900,800,700,600,500,300,200,100); | |
body{ | |
background: #f68674; | |
font-family: 'Exo 2'; | |
font-weight: 100; | |
text-align: center; | |
} | |
a{ | |
position: relative; | |
display: inline-block; | |
width: 40px; | |
height: 40px; | |
border: 3px solid #fff; | |
margin: 60px 0; | |
@include border-radius(40px); | |
text-decoration: none; | |
background: none; | |
z-index:2; | |
&::before{ | |
content: ""; | |
display: inline-block; | |
width: 30px; | |
height: 3px; | |
position: absolute; | |
top: 40px; | |
left: 34px; | |
background: #fff; | |
@include border-radius(20px); | |
@include rotate(30deg); | |
} | |
&:focus{ | |
width: 180px; | |
@include transition-property(width); | |
@include transition-duration(0.8s); | |
@include transition-timing-function(cubic-bezier(0.68, -0.55, 0.265, 1.55)); | |
outline: 0; | |
&::before{ | |
width: 0; | |
top: 20px; | |
left: 190px; | |
@include rotate(0deg); | |
@include transition-property(width, left); | |
@include transition-duration(0.6s); | |
// @include transition-timing-function(cubic-bezier(0.785, 0.135, 0.15, 0.86)); | |
@include transition-timing-function(cubic-bezier(1,-0.28,0,.9)); | |
} | |
} | |
} | |
i{ | |
display: block; | |
width: 500px; | |
color: #fff; | |
font-size: 48px; | |
margin: 0 auto; | |
font-style: normal; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment