<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>CodePen - Interactive profile card</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto:400,300,900,500' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:400,300,700' rel='stylesheet' type='text/css'><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
<link rel="stylesheet" href="./style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body>
<!-- partial:index.partial.html -->
<div id="card">
<div id="blur">
<div id="color"></div>
</div>
<div id="profile">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/225748/profile.jpg" alt="User" />
<h1>Iva Dopuđ</h1>
<p>Front-end Web Developer</p>
<div class="info">
<i class="fa fa-info fa-1x block"></i>
<i class="fa fa-angle-down fa-2x block"></i>
<p>In short, I spend my earthly time striving to create some darned awesome UI designs, and also develop a few. Student @ <a href="http://en.ict.edu.rs/" target="_blank">ICT College</a>.</p>
<p>Find me on:</p>
<a class="link" href="https://twitter.com/Masquetina/" target="_blank"><i class="fa fa-twitter fa-2x social"></i></a>
<a class="link" href="http://dribbble.com/Masquetina/" target="_blank"><i class="fa fa-dribbble fa-2x social"></i></a>
<a class="link" href="https://codepen.io/Masquetina" target="_blank"><i class="fa fa-codepen fa-2x social"></i></a>
</div>
</div>
</div>
<!-- partial -->
<script src="./script.js"></script>
</body>
</html>
body {
background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/225748/MD_background.png) no-repeat center center fixed;
background-size: cover;
overflow: hidden;
cursor: default;
}
#card {
width: 400px;
height: 300px;
position: relative;
margin: 10% auto;
border-radius: 8px;
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.2), 0px 2px 6px rgba(0, 0, 0, 0.4);
overflow: hidden;
}
#blur {
background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/225748/MD_background.png) no-repeat center center fixed;
background-size: cover;
width: 430px;
height: 330px;
position: relative;
top: -15px;
left: -15px;
border-radius: 8px;
-webkit-filter: blur(8px);
-moz-filter: blur(8px);
filter: blur(8px);
}
#color {
background: rgba(255, 255, 255, .60);
width: 430px;
height: 330px;
}
#profile {
cursor: grabbing;
width: 400px;
height: 300px;
position: relative;
top: -330px;
border-radius: 8px;
}
img {
width: 100px;
height: 100px;
border-radius: 100px;
position: relative;
top: 32px;
display: block;
margin: 0 auto;
-webkit-filter: sepia(.25);
-moz-filter: sepia(.25);
filter: sepia(.25);
}
h1 {
color: rgba(38, 50, 56, 1);
font-family: 'Roboto Condensed', sans-serif;
font-size: 36px;
font-weight: 700;
text-align: center;
position: relative;
top: 48px;
}
p {
color: rgba(38, 50, 56, .87);
font-family: 'Roboto Condensed', sans-serif;
font-size: 16px;
font-weight: 400;
text-align: center;
position: relative;
top: 56px;
}
a {
color: rgba(255, 255, 255, 1);
transition: color 0.4s;
text-decoration: none;
}
a:hover {
color: rgba(255, 255, 255, .70);
transition: color 0.4s;
}
.info {
text-align: center;
margin: 0 auto;
position: relative;
top: 86px;
background: rgba(38, 50, 56, 1);
width: 32px;
height: 32px;
border-radius: 100px;
background-position: center center;
background-size: cover;
transition: all 0.2s ease;
z-index: 0;
}
.info.active {
width: 100%;
height: 200%;
position: relative;
top: -100%;
background: rgba(38, 50, 56, 1);
transition: width .1s ease, height .2s ease, top .2s ease, z-index .2s ease;
z-index: 999;
}
.info i.block {
color: rgba(255, 255, 255, .6);
display: block;
}
.info .fa-info {
padding: 8px;
cursor: pointer;
visibility: visible;
opacity: 1;
transition: visibility 0s, opacity 0.4s ease;
}
.info.active .fa-info {
visibility: hidden;
opacity: 0;
transition: visibility 0s, opacity 0.4s ease;
}
.info .fa-angle-down {
cursor: pointer;
visibility: hidden;
}
.info.active .fa-angle-down {
position: relative;
margin: 0 auto;
width: 24px;
height: 24px;
padding: 4px;
visibility: visible;
position: relative;
top: 128px;
animation-name: visible;
animation-duration: 0.3s;
}
@keyframes visible {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.info p {
color: rgba(255, 255, 255, 1);
font-family: 'Roboto Condensed', sans-serif;
font-size: 18px;
line-height: 110%;
font-weight: 400;
text-align: center;
padding: 24px;
position: relative;
top: 144px;
visibility: hidden;
}
.info.active p {
visibility: visible;
animation-name: entrance-first;
animation-duration: 0.4s;
}
.info .link {
visibility: hidden;
margin: 24px 24px 0px 24px;
padding: 16px 4px 4px 4px;
cursor: pointer;
position: relative;
top: 144px;
}
.info.active .link {
visibility: visible;
animation-name: entrance-second;
animation-duration: 0.5s;
}
@keyframes entrance-first {
0% {
top: 200px;
}
100% {
top: 144px;
}
}
@keyframes entrance-second {
0% {
top: 200px;
}
100% {
top: 144px;
}
}
$(function() {
$("#card").draggable();
$(".block").on("click", function() {
$(".info").toggleClass("active");
});
});