Last active
September 4, 2018 07:56
-
-
Save alexandreramosdev/6343809aaf8d77547d41f167307286d7 to your computer and use it in GitHub Desktop.
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
<div class="wrapper-card"> | |
<div class="card"> | |
<div class="card__side card__side--front"> | |
<img src="img/svg/servico-1.svg" alt="icon" class="card__img"> | |
<h2 class="heading-h3">Lorem</h2> | |
</div> | |
<div class="card__side card__side--back"> | |
<p class="paragraphy card__text">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</p> | |
<a href="" class="btn">Lorem ipsum</a> | |
</div> | |
</div> | |
<div class="card"> | |
<div class="card__side card__side--front"> | |
<img src="img/svg/servico-2.svg" alt="icon" class="card__img"> | |
<h2 class="heading-h3">Lorem</h2> | |
</div> | |
<div class="card__side card__side--back"> | |
<p class="paragraphy card__text">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</p> | |
<a href="" class="btn">Lorem ipsum</a> | |
</div> | |
</div> | |
</div> | |
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
.card{ | |
position: relative; | |
width: 28rem; | |
height: 25rem; | |
perspective: 150rem; | |
margin: 1rem; | |
&__side{ | |
width: 100%; | |
height: 100%; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
flex-direction: column; | |
position: absolute; | |
backface-visibility: hidden; | |
transition: all .8s linear; | |
box-shadow: 0 1rem 2rem rgba(0, 0, 0, .2); | |
overflow: hidden; | |
top: 0; | |
left: 0; | |
cursor: pointer; | |
&--front{ | |
background-color: $color-white; | |
} | |
&--back{ | |
transform: rotateY(180deg); | |
background-color: $color-white; | |
} | |
} | |
&__img{ | |
width: 6rem; | |
} | |
&__text{ | |
display: block; | |
text-align: center; | |
margin-bottom: 1.5rem; | |
width: 80%; | |
} | |
&:hover &__side--front{ | |
transform: rotateY(-180deg); | |
} | |
&:hover &__side--back{ | |
transform: rotateY(0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment