Created
April 29, 2019 09:39
-
-
Save hskang9/83fa36fdc5492f168e22a7b6f6d160a8 to your computer and use it in GitHub Desktop.
Hover Componenet Style
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
const HoverContainer = styled.div` | |
background: url(${props => props.image}); | |
background-size: cover; | |
background-position: center; | |
height: 100%; | |
color: white; | |
padding: 20px; | |
font-size: 18px; | |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; | |
font-weight: bold; | |
border-radius: 10px; | |
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); | |
box-shadow: 0 10px 20px rgba(0,0,0, 0.25); | |
position: relative; | |
&:hover { | |
background: #1199EE; | |
transform: scale(1.1, 1.1) translateY(-5px); | |
box-shadow: 0 20px 40px rgba(0,0,0, 0.5); | |
} | |
div { | |
position: absolute; | |
top: 0; | |
left: 0; | |
border-radius: 10px; | |
} | |
p { | |
position: absolute; | |
top: 0; | |
left: 20px; | |
} | |
` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment