Skip to content

Instantly share code, notes, and snippets.

@R3V1Z3
Created June 16, 2013 16:25
Show Gist options
  • Save R3V1Z3/5792542 to your computer and use it in GitHub Desktop.
Save R3V1Z3/5792542 to your computer and use it in GitHub Desktop.
Simple way to highlight keypress or key combinations with CSS. Just add a <span> with a "keypress" class to the relevant text.
/*
Simple way to highlight keypress or key combinations with CSS.
Just add a <span> with a "keypress" class to the relevant text.
example: Press <span class="keypress">Ctrl-C</span> to copy.
*/
span.keypress {
/* for use with white background */
border: 1px solid #000;
border-bottom: 3px solid #000;
border-radius: 3px;
padding-left: 5px;
padding-right: 5px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment