Skip to content

Instantly share code, notes, and snippets.

@hskang9
Created April 29, 2019 09:39
Show Gist options
  • Save hskang9/83fa36fdc5492f168e22a7b6f6d160a8 to your computer and use it in GitHub Desktop.
Save hskang9/83fa36fdc5492f168e22a7b6f6d160a8 to your computer and use it in GitHub Desktop.
Hover Componenet Style
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