Skip to content

Instantly share code, notes, and snippets.

@thomasyip
Created February 25, 2017 05:46
Show Gist options
  • Save thomasyip/4994b43d6f5f224d72a43722daac923f to your computer and use it in GitHub Desktop.
Save thomasyip/4994b43d6f5f224d72a43722daac923f to your computer and use it in GitHub Desktop.
A simple html to combine a number of photos into one
<html>
<head>
<style>
* {
margin: 0;
padding: 0;
}
.row span {
display: inline-block;
position: relative;
box-sizing: border-box;
width: 33%;
background-size: cover;
background-repeat:no-repeat;
overflow: hidden;
background-position: center;
}
.row span:before {
display: block;
content: "";
margin-top: 50%;
}
</style>
</head>
<body>
<div class="row"><!--
--><span style="background-image: url('./2.jpg');"></span><!--
--><span style="background-image: url('./4.jpg');"></span><!--
--><span style="background-image: url('./3.jpg');"></span><!--
--></div>
<div class="row"><!--
--><span style="background-image: url('./6.jpg');"></span><!--
--><span style="background-image: url('./5.jpg');"></span><!--
--><span style="background-image: url('./1.jpg');"></span><!--
--></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment