Skip to content

Instantly share code, notes, and snippets.

@tsironis
Created January 1, 2012 13:47
Show Gist options
  • Save tsironis/1547366 to your computer and use it in GitHub Desktop.
Save tsironis/1547366 to your computer and use it in GitHub Desktop.
Demo for basic CSS3 styling & transitions for image elements
/**
* Demo for basic CSS3 styling & transitions for image elements
*/
.prof-pic {
border: 10px solid #444444;
border-radius: 14px;
margin: 0.5em;
opacity: 0.7;
-moz-transition: all 0.5s;
-webkit-transition: all 0.5s;
-ms-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
.prof-pic:hover {
opacity: 1;
}
#pics {
width: 65%;
margin: 0 auto;
padding: 2em 0 3em;
}
footer {
background: #fff;
border-radius: 10px;
margin: 0 auto;
width: 75%;
padding: 1em;
border: 1px solid rgba(255,255,255,.5);
border-radius: 10px;
box-sizing: border-box;
background: rgba(140,140,140,.5);
font: 150%/1.6 sans-serif;
text-align: center;
box-shadow: -1px -1px 10px rgba(255,255,255,.3) inset,
2px 2px 20px rgba(0,0,0,.5);
text-shadow: 0 1px 1px rgba(255,255,255,.6);
-moz-transition: all 0.3s;
-webkit-transition: all 0.3s;
-ms-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
}
footer:hover {
background: rgba(140,140,140,.25);
}
footer h1 {
font-family: 'Consolas', monospace;
font-weight: normal;
font-size: 2.2em;
text-align: center;
}
body { background-image: url("http://tsironis.isnap.gr/images/stripes.png"); }
/* Flaired edges, by Tomas Theunissen */
hr.style-seven {
width:85%;
height: 30px;
border-style: solid;
border-color: black;
border-width: 1px 0 0 0;
border-radius: 20px;
}
hr.style-seven:before { /* Not really supposed to work, but does */
display: block;
content: "";
height: 30px;
margin-top: -31px;
border-style: solid;
border-color: black;
border-width: 0 0 1px 0;
border-radius: 20px;
}
<div id="pics">
<img src="http://tsironis.isnap.gr/images/team.png" class="prof-pic" alt="Image No.1">
<img src="http://tsironis.isnap.gr/images/team-1.jpeg" class="prof-pic" alt="Image No.2">
<img src="http://tsironis.isnap.gr/images/team-2.jpeg" class="prof-pic" alt="Image No.3">
</div>
<footer>
<h1>Awesome pictures are awesome!</h1>
<hr class="style-seven">
</footer>
{"view":"split","prefixfree":"1","page":"result"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment