Skip to content

Instantly share code, notes, and snippets.

@csssecrets
Last active January 17, 2023 16:27
Show Gist options
  • Select an option

  • Save csssecrets/e1f72639c34a5578dda3 to your computer and use it in GitHub Desktop.

Select an option

Save csssecrets/e1f72639c34a5578dda3 to your computer and use it in GitHub Desktop.
Parallelograms — with extra HTML element
/**
* Parallelograms — with extra HTML element
*/
.button { transform: skewX(45deg); }
.button > div { transform: skewX(-45deg); }
.button {
display: inline-block;
padding: .5em 1em;
border: 0; margin: .5em;
background: #58a;
color: white;
text-transform: uppercase;
text-decoration: none;
font: bold 200%/1 sans-serif;
}
<a href="#yolo" class="button"><div>Click me</div></a>
<button class="button"><div>Click me</div></button>
// 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