A simple CSS on/off toggle switch checkbox. Uses before
and :checked
psuedo selectors and the content
property to make just a plain old simple <input type="checkbox">
look nice, provide greater affordance, and say "on" and "off". It looks like this:
tested on android 3.1 and iOS5.1.1 mobile safari
Download the production version or the development version.
In your web page:
<!doctype>
<html>
<head>
<link rel="stylesheet" href="mobilecheckbox.css">
</head>
<body>
<input type="checkbox">
</body>
</html>
- v0.1.0-pre - 08/28/2012 - mobilecheckbox.css is pre release awaiting more mobile browser testing.
Copyright (c) 2012 Boaz Sender
Licensed under the MIT, GPL licenses.
In lieu of a formal styleguide, take care to maintain the existing coding style. Lint your code using grunt and grunt-css.
Please don't edit files in the dist
subdirectory as they are generated via grunt. You'll find source code in the src
subdirectory!
This assumes you have node.js and npm installed already.
- Test that grunt is installed globally by running
grunt --version
at the command-line. - If grunt isn't installed globally, run
npm install -g grunt
to install the latest version. You may need to runsudo npm install -g grunt
. - From the root directory of this project, run
npm install
to install the project's dependencies.