LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

Instagram Hoverin’

CSS
.instagrams {
  width: 1000px;
  margin: 0 auto;
}

.instagram {
  position: relative;
  width: 31%;
  margin: 1%;
  padding-bottom: 31%;
  float: left;
  overflow: hidden;
}
.instagram .user {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 15px;
  background: #531313;
  text-overflow: ellipsis;
}
.instagram .user img {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 70px;
  border-radius: 200px;
  vertical-align: middle;
  box-shadow: 0px 0px 0px 5px #d02f2f;
  -webkit-transform: translateY(100px);
  -moz-transform: translateY(100px);
  -ms-transform: translateY(100px);
  -o-transform: translateY(100px);
  transform: translateY(100px);
  -webkit-transition: all 0.5s;
  -moz-transition: all 0.5s;
  transition: all 0.5s;
}
.instagram .user img:hover {
  border-radius: 0;
  box-shadow: none;
}
.instagram .user h1 {
  width: 70%;
  margin: 0;
  font-size: 20px;
  line-height: 100px;
  font-weight: 100;
  color: white;
  text-align: left;
}
.instagram > img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  -webkit-transition: all 0.5s;
  -moz-transition: all 0.5s;
  transition: all 0.5s;
}
.instagram:hover > img {
  -webkit-filter: grayscale(100%);
  -webkit-transform: translateY(100px);
  -moz-transform: translateY(100px);
  -ms-transform: translateY(100px);
  -o-transform: translateY(100px);
  transform: translateY(100px);
}
.instagram:hover > .user img {
  -webkit-transform: translateY(0px);
  -moz-transform: translateY(0px);
  -ms-transform: translateY(0px);
  -o-transform: translateY(0px);
  transform: translateY(0px);
}

* {
  box-sizing: border-box;
}

body {
  background: #7d1c1c;
  font-family: 'Helvetica Neue', helvetica, arial, sans-serif;
  font-weight: 100;
  letter-spacing: 2px;
  color: white;
  -webkit-backface-visibility: hidden;
}

h1 {
  font-size: 50px;
  font-weight: 100;
  text-align: center;
  text-transform: uppercase;
  color: #d02f2f;
}

.cf:before,
.cf:after {
  content: " ";
  /* 1 */
  display: table;
  /* 2 */
}

.cf:after {
  clear: both;
}
JS
$instagrams = $('.instagrams');

$.ajax({
  type: "GET",
  url: "https://api.instagram.com/v1/media/popular?client_id=2751b9d3ef1948da8c6eeceefe3fb718&count=3",
  dataType: "jsonp",
  success: function (json) {
    $(json.data).each(function(e) {
      $instagrams.append(
        '
' + '
' + '' + '

' + this.user.full_name + '

' + '
' + '' + '
' ); }); } });
Host Instantly Drag and Drop Website Builder

 

Description

Could really be used with any image or whatever, but I made it with Instagram photos in mind.
Term
Mon, 11/27/2017 - 21:59

Related Codes

Pen ID
Pen ID
Pen ID