Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 683 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 683 Bytes

kbd.css

A small (474 bytes gzipped) stylesheet for rendering text as keyboard keys. It scales with text size and is compatible with modern browsers. Use the .kbd class on a span or the <kbd> tag:

<p>
After you have gained access to the missile control system, press 
<kbd>Ctrl</kbd> + <span class="kbd">Backspace</span> to override the safety controls.
</p>

results in:

"Example"

You can also use the kbd-down class to display keys as pressed down.

You need to specify a z-index for the parent element. Play with the example on JSbin: http://jsbin.com/yopiko/1/