Skip to content

Instantly share code, notes, and snippets.

@tkbremnes
Created January 24, 2012 00:03
Show Gist options
  • Save tkbremnes/1666622 to your computer and use it in GitHub Desktop.
Save tkbremnes/1666622 to your computer and use it in GitHub Desktop.
Creative Commons attribution box.
/**
* Creative Commons attribution box.
*/
figure {
height:200px;
width: 300px;
background: pink;
position: relative;
}
.cc {
position: absolute;
bottom: 0;
right: 0;
}
.cc:hover .attr{
opacity: 1;
}
.attr {
background: black;
height: 50px;
width: 150px;
opacity: 0.7;
color: white;
position: absolute;
bottom:10px;
right:0;
border-radius: 12px 0 0 12px;
font-family: sans-serif;
font-size: 0.8em;
text-align: center;
transition: opacity linear 0.3s;
}
.attr p {
padding: 0.4em;
}
.cc img {
width: 36px;
position: absolute;
bottom:17px;
left: -168px;
z-index: 1;
}
<!-- content to be placed inside <body>…</body> -->
<figure>
<div class="cc">
<img src="http://mirrors.creativecommons.org/presskit/icons/cc.svg">
<div class="attr">
<p>Content</p>
</div>
</div>
</figure>
{"view":"split","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment