<!-- this is the markup. you can change the details (your own name, your own avatar etc.) but don’t change the basic structure! -->
<aside class="profile-card">
<header>
<!-- here’s the avatar -->
<a href="https://tutsplus.com">
<img src="https://raziraz.github.io/codepen/envato_contest/avatar.gif">
</a>
<!-- the username -->
<h1>Razi Kantorp Weglin</h1>
<!-- and role or location -->
<h2>Designer & Visual Developer</h2>
</header>
<!-- bit of a bio; who are you? -->
<div class="profile-bio">
<p>Hi. I'm a designer and front-end developer based in Sweden. But actually I wanted to be a astronaut.</p>
</div>
<!-- some social links to show off -->
<ul class="profile-social-links">
<!-- twitter - el clásico -->
<li>
<a href="https://twitter.com/kantorpweglin">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/social-twitter.svg">
</a>
</li>
<!-- envato – use this one to link to your marketplace profile -->
<li>
<a href="http://instagram.com/kantorpweglin">
<img src="https://raziraz.github.io/codepen/img/instagram-icon.svg">
</a>
</li>
<!-- codepen - your codepen profile-->
<li>
<a href="https://codepen.io/razitazi">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/social-codepen.svg">
</a>
</li>
<!-- add or remove social profiles as you see fit -->
</ul>
</aside>
<!-- that’s all folks! -->
@import url(https://fonts.googleapis.com/css?family=Khula:300,600,400);
html,
body {
overflow: hidden;
width: 100%;
height: 100%;
margin: 0;
}
body {
font-family: Khula, sans-serif;
font-size: 13px;
font-weight: 300;
line-height: 1.5;
color: #222;
background: url('https://raziraz.github.io/codepen/envato_contest/bg-space.jpg') #222 center center;
background-size: cover;
}
h1 {
font-size: 18px;
font-weight: 300;
line-height: 1.2;
margin: 4.5% 0 0 4.5%;
}
h2 {
font-size: 13px;
font-weight: 300;
line-height: 1.5;
margin: 0 0 4% 4.5%;
color: #cc3638;
}
.profile-card {
position: absolute;
z-index: 100;
top: 50%;
left: 50%;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
min-width: 290px;
max-width: 450px;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
-webkit-animation: bouncein 1s;
animation: bouncein 1s;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.profile-card > header {
display: block;
line-height: 0;
width: 88%;
max-width: 88%;
background: #fff;
}
.profile-card > header > a {
line-height: 0;
display: block;
background-image: url('https://raziraz.github.io/codepen/envato_contest/avatar-down.gif');
background-size: 100% 100%;
}
.profile-card > header a > img {
width: 100%;
}
.profile-card:hover > header a > img {
opacity: 0;
}
.profile-card:hover > header + .profile-bio {
max-height: 200px;
-webkit-transition: max-height .5s ease-in;
transition: max-height .5s ease-in;
}
.profile-card:hover > header + .profile-bio p {
-webkit-animation: fadein 2s;
animation: fadein 2s;
}
.profile-bio {
clear: both;
overflow: hidden;
box-sizing: border-box;
max-width: 88%;
width: 88%;
max-height: 0;
-webkit-transition: max-height .5s ease-out;
transition: max-height .5s ease-out;
color: #fff;
background: #0f6dc5;
-webkit-order: 1;
-webkit-box-ordinal-group: 2;
-ms-flex-order: 1;
order: 1;
}
.profile-bio p {
margin: 4.5%;
-webkit-animation: fadeout 2s;
animation: fadeout 2s;
}
.profile-social-links {
line-height: 0;
display: -webkit-flex;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
box-sizing: border-box;
max-width: 12%;
width: 12%;
margin: 0;
padding: 3.5%;
list-style-type: none;
text-align: center;
background: url('https://raziraz.github.io/codepen/envato_contest/razi-logo.png') #cc3638 no-repeat center 7%;
background-image: url('https://raziraz.github.io/codepen/envato_contest/razi-logo.svg');
background-size: 40% auto;
flex-direction: column-reverse;
-ms-flex-direction: column-reverse;
-webkit-flex-direction: column-reverse;
-webkit-box-orient: vertical;
-webkit-box-direction: reverse;
-webkit-box-pack: end;
-moz-box-pack: end;
-webkit-flex-pack: end;
-ms-flex-pack: end;
}
.profile-social-links img {
width: 100%;
height: auto;
margin-top: 10px;
-webkit-filter: saturate(0) brightness(100);
filter: saturate(0) brightness(100);
}
.profile-social-links li:first-child {
-webkit-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}
.profile-social-links li:first-child:hover {
-webkit-transform: rotate(20deg);
-ms-transform: rotate(20deg);
transform: rotate(20deg);
}
.profile-social-links li:nth-child(2):hover {
-webkit-animation: pulse .4s ease-in-out;
animation: pulse .4s ease-in-out;
}
.profile-social-links li:last-child:hover {
-webkit-animation: shake .7s ease-in-out;
animation: shake .7s ease-in-out;
}
.profile-social-links li:last-child {
-webkit-order: -1;
-webkit-box-ordinal-group: 0;
-ms-flex-order: -1;
order: -1;
}
.profile-social-links li:last-child img {
width: 90%;
-webkit-filter: saturate(0) invert(100%);
filter: saturate(0) invert(100%);
}
@media (max-width: 480px) {
.profile-card {
flex-direction: column;
-webkit-flerowx-direction: column;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
-ms-flex-direction: column;
}
.profile-card > header,
.profile-bio {
max-width: 100%;
width: 100%;
}
.profile-bio {
max-height: 100%;
}
.profile-card:hover > header + .profile-bio p,
.profile-bio p {
-webkit-animation: none;
animation: none;
}
h1 {
font-size: 16px;
}
h2 {
line-height: 1.2;
margin-top: 0.5%;
}
.profile-social-links {
display: -webkit-flex;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
flex-direction: row;
max-width: 100%;
width: 100%;
max-height: 70px;
background: url('https://raziraz.github.io/codepen/envato_contest/razi-logo-mobile.png') #cc3638 no-repeat 4.5% center;
background-image: url('https://raziraz.github.io/codepen/envato_contest/razi-logo-mobile.svg');
background-size: auto 15px;
-webkit-flex-direction: row;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
-webkit-order: -1;
-webkit-box-ordinal-group: 0;
-ms-flex-order: -1;
order: -1;
-webkit-box-pack: end;
-ms-flex-pack: end;
justify-content: flex-end;
}
.profile-social-links img {
width: auto;
height: 18px;
margin-top: 0;
margin-left: 8px;
-webkit-filter: saturate(0) brightness(100);
filter: saturate(0) brightness(100);
}
.profile-social-links li:last-child img {
width: auto;
}
}
@-webkit-keyframes shake {
0% {
-webkit-transform: translateX(0);
transform: translateX(0);
}
20% {
-webkit-transform: translateX(-1px);
transform: translateX(-1px);
}
40% {
-webkit-transform: translateX(2px);
transform: translateX(2px);
}
60% {
-webkit-transform: translateX(-1px);
transform: translateX(-1px);
}
}
@keyframes shake {
0% {
-webkit-transform: translateX(0);
transform: translateX(0);
}
20% {
-webkit-transform: translateX(-1px);
transform: translateX(-1px);
}
40% {
-webkit-transform: translateX(2px);
transform: translateX(2px);
}
60% {
-webkit-transform: translateX(-1px);
transform: translateX(-1px);
}
}
@-webkit-keyframes pulse {
0% {
-webkit-transform: scale(1);
transform: scale(1);
}
50% {
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
}
}
@keyframes pulse {
0% {
-webkit-transform: scale(1);
transform: scale(1);
}
50% {
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
}
}
@-webkit-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@-webkit-keyframes fadeout {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes fadeout {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@-webkit-keyframes bouncein {
0% {
-webkit-transform: translate(-50%, -200%);
transform: translate(-50%, -200%);
opacity: 0;
}
50% {
-webkit-transform: translate(-50%, -30%);
transform: translate(-50%, -30%);
opacity: 1;
}
100% {
-webkit-transform: translateY(-50%, -50%);
transform: translateY(-50%, -50%);
}
}
@keyframes bouncein {
0% {
-webkit-transform: translate(-50%, -200%);
transform: translate(-50%, -200%);
opacity: 0;
}
50% {
-webkit-transform: translate(-50%, -30%);
transform: translate(-50%, -30%);
opacity: 1;
}
100% {
-webkit-transform: translateY(-50%, -50%);
transform: translateY(-50%, -50%);
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.