umbrUI is a demo of input checkbox elements made with CSS3. There was a request, so I tried. First I thought to create a div with 2 buttons inside, but acutally, when you think about it.. a switch has an on and off state, so why not use a checkbox input element. And as it turnes out, it worked out pretty good.
For the above switches no JavaScript, images or extra markup is needed. Just a normal <input type=”checkbox” /> and custom data attributes to add the Pictos Font icons, like this:
<input type="checkbox" data-icon1="P" data-icon2="v" />The rest is all CSS3. The main input element is mainly just the black background. Then the :before is used for the left part und the :after for the right one. The Pictos Icons get injected trough content:attr(data-icon-left);. For the 3Dish perspective a transform:rotateY is used, but unfortunately for now, only Safari can render it correctly. Then of course a lot of gradients, box-shadows, text-shadows. To have the on/off states, you can use the pseudo class :checked to give it a different style. A small detail if you look closely.. there is a real reflection of the active blue icon applied with box-reflect.
See the demo (Safari or Chrome).
(via simurai)
-
anunturi-daniela reblogged this from simurai
-
mohamed-ted liked this
-
hot-yoga-benefits reblogged this from simurai
-
ruriwo liked this
-
price-per-head reblogged this from simurai
-
pixelkoncept reblogged this from simurai
-
jessicakmn reblogged this from simurai
-
jeen-hao reblogged this from four-wheeler
-
idmserial reblogged this from four-wheeler
-
four-wheeler reblogged this from simurai and added:
Brent Everett Parole Officer
-
radiantheatlink reblogged this from insanism
-
ashowtimes reblogged this from simurai
-
-ebooks-for-cheap liked this
-
tigruroz liked this
-
stanjenkins1128 liked this
-
achetervefa liked this
-
enpause liked this
-
dsampaolo liked this
-
streamates liked this
-
texas-hold-em liked this
-
pmpress1 liked this
-
recette-tagada liked this
-
telephonie-mobile liked this
-
crazygeeksonline liked this
-
rooftopglows reblogged this from simurai and added:
This looks so good!
-
play-blackjack liked this
-
last--minute liked this
-
3yar liked this
-
step4ward liked this
-
simurai posted this