CSS Animation - Simple Image Gallery

In this example below you will see how to do a CSS Animation - Simple Image Gallery with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by jxiong3, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright jxiong3 ©
  • HTML
  • CSS
  • JavaScript
    <div class="container">
  <h1 class="text-center">Image Gallery</h1>
  
  <div class="col-sm-4">
    <div class="image-item">
      <img src="http://res.cloudinary.com/dybdvjzvm/image/upload/v1509391552/pexels-photo-240225_vcxs5k.jpg" alt="" />
      <a href="www.google.com" target="_blank">
        <i class="fa fa-cloud-download" aria-hidden="true"></i>
      </a>
    </div>
  </div>
  
  <div class="col-sm-4">
    <div class="image-item">
      <img src="http://res.cloudinary.com/dybdvjzvm/image/upload/v1509391552/pexels-photo-240223_ilwtmo.jpg" alt="" />
      <a href="www.google.com" target="_blank">
        <i class="fa fa-cloud-download" aria-hidden="true"></i>
      </a>
    </div>
  </div>
  
  <div class="col-sm-4">
    <div class="image-item">
      <img src="http://res.cloudinary.com/dybdvjzvm/image/upload/v1509391552/pexels-photo-239975_vp7wgp.jpg" alt="" />
      <a href="www.google.com" target="_blank">
        <i class="fa fa-cloud-download" aria-hidden="true"></i>
      </a>
    </div>
  </div>
</div>

/*Downloaded from https://www.codeseek.co/jxiong3/css-animation-simple-image-gallery-QOwJOX */
    @import "https://fonts.googleapis.com/css?family=Muli:400,700";
body {
	font-family: 'Muli', sans-serif;
}
div.image-item {
	background-color: #000;
	margin: 10px 0px;
	* {
		transition: all 0.35s ease-in-out;
	}
	img {
		width: 100%;
		height: auto;
	}
	i {
		position: absolute;
		top: 50%;
		left: 50%;
		border-radius: 50%;
		font-size: 30px;
		color: orange;
		width: 60px;
		height: 60px;
		line-height: 60px;
		background: #ffffff;
		text-align: center;
		transform: translate(-50%, -50%) scale(0);
	}
	&:hover {
		img {
			opacity: 0.3;
			filter: grayscale(100%);
		}
		i {
			transform: translate(-50%, -50%) scale(1);
			transition: transform 300s 100ms cubic-bexier(0.175, 0.885, 0.32, 1.275);
		}
	}
}


/*Downloaded from https://www.codeseek.co/jxiong3/css-animation-simple-image-gallery-QOwJOX */
    

Comments