Skip to content

Instantly share code, notes, and snippets.

@stanwmusic
Created March 23, 2014 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stanwmusic/9719377 to your computer and use it in GitHub Desktop.
Save stanwmusic/9719377 to your computer and use it in GitHub Desktop.
A Pen by Stan Williams.
<h1>Photo Gallery in CSS3</h1>
<!-- modified by Stan williams
http://codepen.io/Stanssongs
http://stans-songs.com So far I have I made sizing be responsive, and added text styles
<h2>H2 text 2.5em</h2>
<h3>H3 text 2em</h3>
<p> text </p> -->
<div id="gal">
<ul>
<li>
<img src="http://placekitten.com/300/300" class="small" width="100" height="100" /><img src="http://placekitten.com/300/300" class="img" />
</li>
<li>
<img src="http://placekitten.com/300/300?image=3" class="small" width="100" height="100" /><img src="http://placekitten.com/300/300?image=3" class="img" />
</li>
<li>
<img src="http://placekitten.com/300/300?image=1" class="small" width="100" height="100" alt="" /><img src="http://placekitten.com/300/300?image=1" class="img" />
</li>
<li>
<img src="http://placekitten.com/300/300?image=2" class="small" width="100" height="100" alt="" /><img src="http://placekitten.com/300/300?image=2" class="img" />
</li>
<li><li>
<img src="http://placekitten.com/300/300?image=5" class="small" width="100" height="100" alt="" /><img src="http://placekitten.com/300/300?image=5" class="img" />
</li>
<li>
<img src="http://placekitten.com/300/300?image=3" class="small" width="100" height="100" /><img src="http://placekitten.com/300/300?image=3" class="img" />
</li>
<li>
<img src="http://placekitten.com/300/300?image=2" class="small" width="100" height="100" /><img src="http://placekitten.com/300/300?image=2" class="img" />
</li>
<li>
<img src="http://placekitten.com/300/300?image=4" class="small" width="100" height="100" /><img src="http://placekitten.com/300/300?image=4" class="img" />
</li>
<li>
<img src="http://placekitten.com/300/300" class="small" width="100" height="100" /><img src="http://placekitten.com/300/300" class="img" />
</li>
<li>
<img src="http://placekitten.com/300/300?image=2" class="small" width="100" height="100" alt="" /><img src="http://placekitten.com/300/300?image=2" class="img" />
</li>
<li>
<img src="http://placekitten.com/300/300" class="small" width="100" height="100" alt="" /><img src="http://placekitten.com/300/300" class="img" />
</li>
<li>
<img src="http://placekitten.com/300/300?image=4" class="small" width="100" height="100" /><img src="http://placekitten.com/300/300?image=4" class="img" />
</li>
</ul>
</div>
// 2014-03-23
//forked from original author sniperwolf http://codepen.io/sniperwolf/pen/LDGdq
// Copyright (c) 2014 Stan Williams
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
body {
color: #FFFFFF;
background: #10a350;
text-align: center;
font-size: 1em;
}
h1 {
color: #FFFFFF;
font-size: 3em;
text-shadow: #333333 2px 2px 4px;
}
h2 {
color: #FFFFFF;
font-size: 1em;
text-shadow: #333333 2px 2px 4px;
}
h3 {
color: #FFFFFF;
font-size: 2em;
text-shadow: #333333 2px 2px 4px;
}
#gal {
background: #333333;
border: 5px solid #111111;
border-radius: 20px;
margin-left: auto;
margin-right: auto;
overflow: visible;
height: 70%;
width: 70%;
filter: progid:DXImageTransform.Microsoft.Shadow(color='#333333', Direction=135, Strength=10);
box-shadow: #333333 15px 25px 200px;
}
#gal ul {
margin-left: -15px;
}
#gal ul li {
display: inline-table;
list-style: none;
padding: 15px;
}
#gal ul li .img {
border: 1px solid #000000;
box-shadow: #333333 5px 5px 10px;
margin-top: -50px;
margin-left: -50px;
position: absolute;
opacity: 0;
visibility: hidden; filter:progid:DXImageTransform.Microsoft.Shadow(color='#333333', Direction=135, Strength=5);
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
}
#gal ul li:hover .img {
float: right;
height: 300px;
opacity: 1;
width: 300px;
visibility: visible;
}
@stanwmusic
Copy link
Author

Preview it full size here : http://codepen.io/Stanssongs/full/AKyeF
Demo Preview fork it and or and edit it live here http://codepen.io/Stanssongs/pen/AKyeF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment