Skip to content

Instantly share code, notes, and snippets.

@thomasplevy
Forked from anonymous/dabblet.css
Created June 10, 2012 16:15
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 thomasplevy/2906424 to your computer and use it in GitHub Desktop.
Save thomasplevy/2906424 to your computer and use it in GitHub Desktop.
css3 slash images
/**
* css3 slash images
*/
div {
position: relative;
margin: 25px;
}
div:before {
content: "";
border-left: 350px solid white;
border-bottom: 30px solid transparent;
position: absolute;
top: 0;
left: 0;
z-index:1;
}
div:after {
content: "";
border-right: 350px solid white;
border-top: 30px solid transparent;
position: absolute;
bottom: 5px;
left: 0;
z-index: 1;
}
img {
transition: all .3s ease;
}
img:hover {
opacity: .8;
}
<div><img src="http://placedog.com/350/500" alt="DOG!"></div>
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment