Skip to content

Instantly share code, notes, and snippets.

@csssecrets
Created January 4, 2015 15:17
Show Gist options
  • Save csssecrets/012289cc14106a1bd7a5 to your computer and use it in GitHub Desktop.
Save csssecrets/012289cc14106a1bd7a5 to your computer and use it in GitHub Desktop.
Translucent borders
/**
* Translucent borders
*/
body {
background: url('http://csssecrets.io/images/stone-art.jpg');
}
div {
border: 10px solid hsla(0,0%,100%,.5);
background: white;
background-clip: padding-box;
/* styling */
max-width: 20em;
padding: 2em;
margin: 2em auto 0;
font: 100%/1.5 sans-serif;
}
<div>
Can I haz semi-transparent borders?
Pretty please?
</div>
// alert('Hello world!');
{"view":"split-vertical","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