Skip to content

Instantly share code, notes, and snippets.

@zhuangya
Forked from anonymous/dabblet.css
Created August 7, 2013 13:21
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 zhuangya/6173968 to your computer and use it in GitHub Desktop.
Save zhuangya/6173968 to your computer and use it in GitHub Desktop.
Untitled
.highlight img {
display: block;
width: 160px;
height: 160px;
border-radius: 100%;
}
.highlight {
width: 160px;
height: 160px;
border-radius: 160px;
background-color: black;
}
.highlight:before {
content: '\0020';
width: 160px;
height: 80px;
position: absolute;
z-index: 3;
float: left;
background-image: -webkit-linear-gradient(65deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.9));
-webkit-transform-origin: bottom center;
-webkit-transform: rotate(-45deg);
}
<!-- content to be placed inside <body>…</body> -->
<div class="highlight">
<img src="http://placekitten.com/g/160/160" alt="cat"/>
</div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment