Skip to content
/ kbd.css Public

Keyboard CSS styles for hotkey guides and other stuff

Notifications You must be signed in to change notification settings

JSlote/kbd.css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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/

About

Keyboard CSS styles for hotkey guides and other stuff

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages