Skip to content

Instantly share code, notes, and snippets.

@googya
Last active April 26, 2018 03:10
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 googya/666d4fc0a6083836914d4ef41633927a to your computer and use it in GitHub Desktop.
Save googya/666d4fc0a6083836914d4ef41633927a 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: border-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