Last active
May 30, 2016 19:00
-
-
Save sangress/ddea80501cd74bf72f8eb4af78b0672a to your computer and use it in GitHub Desktop.
flexbox - goat gallery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="flexbox with scroll"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="flex"> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
<div class="flex-item"><img src="http://kindersay.com/files/images/goat.png" alt=""></div> | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.flex { | |
display: flex; | |
border: 10px solid; | |
flex-flow: row wrap; | |
overflow: auto; | |
max-height: 400px; | |
box-shadow: 0 0 15px blue; | |
border-radius: 4px; | |
padding: 20px; | |
padding-left: 40px; | |
} | |
.flex-item { | |
border: 2px dashed blue; | |
box-shadow: 0 0 10px #000; | |
background-color: gold; | |
width: 100px; | |
height: 100px; | |
margin: 5px; | |
flex: 0 auto; | |
transition: 1s; | |
} | |
.flex-item:hover { | |
box-shadow: 0 0 0; | |
background-color: yellow; | |
} | |
img { | |
width: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment