Last active
February 7, 2016 09:37
-
-
Save ruizfrontend/4658588 to your computer and use it in GitHub Desktop.
Some CSS3 Buttons & counters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://code.jquery.com/jquery-1.11.3.js"></script> | |
<script src="./script.js"></script> | |
<link rel="stylesheet" href="./style.css"> | |
<div class="bg_blue"> | |
<div class="butt butt-orange"><i class="icon-cart"></i>añadir a la cesta</div> | |
<br/><br/> | |
<div class="butt ">add to cart</div> | |
<br/><br/> | |
<div class="butt butt-orange butt-big">Checkout</div> | |
<br/><br/> | |
<div class="unit-selector u_sBig"> | |
<span class="unit-selector--units">0</span> | |
<span class="unit-selector--less">-</span> | |
<span class="unit-selector--plus">+</span> | |
</div> | |
<br/> | |
</div> | |
<div class="bg_white"> | |
<br/> | |
<div class="unit-selector u_sNorm clearfix"> | |
<span class="unit-selector--units">0</span> | |
<span class="unit-selector--less">-</span> | |
<span class="unit-selector--plus">+</span> | |
</div> | |
<br/><br/> | |
<br/><br/> | |
<div class="unit-selector u_sSmall"> | |
<span class="unit-selector--units">0</span> | |
<span class="unit-selector--less">-</span> | |
<span class="unit-selector--plus">+</span> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
var methods = { | |
init: function (options) { | |
return this.each(function () { | |
var ths = $(this), | |
data = ths.data('u_s'); | |
// If the plugin hasn't been initialized yet | |
if (!data) { | |
$(this).data('u_s', { | |
but_plus: ths.find('.unit-selector--plus'), | |
but_less: ths.find('.unit-selector--less'), | |
but_val: ths.find('.unit-selector--units'), | |
value: '', | |
enabled: 1 | |
}); | |
}; | |
var value = ths.data('u_s').but_val.html(); | |
var data = ths.data('u_s'); | |
data.but_plus.bind('click', methods.plus); | |
data.but_less.bind('click', methods.less); | |
}); | |
}, | |
plus: function () { | |
return $(this).each(function () { | |
var $this = $(this).parent(), | |
data = $this.data('u_s'); | |
data.but_val.html(++data.value); | |
}); | |
}, | |
less: function () { | |
return $(this).each(function () { | |
var $this = $(this).parent(), | |
data = $this.data('u_s'); | |
if (data.value > 0) { | |
data.but_val.html(--data.value); | |
}; | |
}); | |
}, | |
disable: function () { | |
return $(this).each(function () { | |
var $this = $(this), | |
data = $this.data('u_s'); | |
if (!data) { | |
}; | |
$(this).addClass('disabled'); | |
data.but_plus.unbind('click'); | |
data.but_less.unbind('click'); | |
}); | |
} | |
}; | |
$.fn.u_s = function (method) { | |
if (method == 'disable') { | |
methods.init.apply(this, arguments); | |
methods.disable.apply(this, arguments); | |
} else if (methods[method]) { | |
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); | |
} else if (typeof method === 'object' || !method) { | |
return methods.init.apply(this, arguments); | |
} else { | |
$.error('Method ' + method + ' does not exist on u_s plugin'); | |
} | |
}; | |
})(jQuery); | |
$(document).ready(function () { | |
$('.unit-selector').u_s(); | |
//$('.unit-selector').u_s('disable'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://meyerweb.com/eric/tools/css/reset/ */ | |
/* v1.0 | 20080212 */ | |
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { | |
margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent;} | |
html { | |
font-size: 62.5%; | |
} | |
body { | |
line-height: 1; | |
} | |
* html body, *:first-child + html body { | |
font-size: 101%; | |
} | |
ol, ul { list-style: none;} | |
blockquote, q { quotes: none; } | |
blockquote:before, blockquote:after, q:before, q:after { content:''; | |
content: none; | |
} | |
/* remember to define focus styles! */ | |
:focus { | |
outline: 0; | |
} | |
/* remember to highlight inserts somehow! */ | |
ins { | |
text-decoration: none; | |
} | |
del { | |
text-decoration: line-through; | |
} | |
/* tables still need 'cellspacing="0"' in the markup */ | |
table { | |
border-collapse: collapse; | |
border-spacing: 0; | |
} | |
input, button { | |
padding: 0; | |
} | |
h1, h2, h3, h4, h5, h6 { | |
font-weight:normal; | |
} | |
/*MISC | |
----------------------------------------------------------------------------------------------------------*/ | |
.wk-icon { | |
background-color:transparent; | |
background-repeat:no-repeat; | |
text-indent:-9999px; | |
display:inline-block; | |
} | |
.clearfix:after { | |
content:"."; | |
display:block; | |
clear:both; | |
visibility:hidden; | |
line-height:0; | |
height:0; | |
} | |
.clearfix { | |
display:inline-block; | |
} | |
html[xmlns] .clearfix { | |
display:block; | |
} | |
* html .clearfix { | |
height:1%; | |
} | |
/*LAYOUT | |
----------------------------------------------------------------------------------------------------------*/ | |
body { | |
font-family:"Helvetica Neue", Helvetica, Arial, sans-serif; | |
} | |
/*Buttons bootstrap style!-----------------------------------*/ | |
.butt { | |
display: inline-block; | |
padding: 6px 10px 6px; | |
margin-bottom: 0; | |
font-size: 13px; | |
line-height: 16px; | |
color: #333333; | |
text-align: center; | |
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); | |
vertical-align: middle; | |
*display: inline; | |
/* IE7 inline-block hack */ | |
*zoom: 1; | |
background-color: #f5f5f5; | |
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); | |
background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6); | |
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); | |
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); | |
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); | |
background-image: linear-gradient(top, #ffffff, #e6e6e6); | |
background-repeat: repeat-x; | |
border-color: #e6e6e6 #e6e6e6 #bfbfbf; | |
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); | |
border: 1px solid #cccccc; | |
border-bottom-color: #b3b3b3; | |
-webkit-border-radius: 4px; | |
-moz-border-radius: 20px; | |
border-radius: 20px; | |
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); | |
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); | |
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); | |
cursor: pointer; | |
} | |
.butt:hover { | |
color: #333333; | |
text-decoration: none; | |
background-color: #e6e6e6; | |
background-position: 0 -15px; | |
-webkit-transition: background-position 0.1s linear; | |
-moz-transition: background-position 0.1s linear; | |
-ms-transition: background-position 0.1s linear; | |
-o-transition: background-position 0.1s linear; | |
transition: background-position 0.1s linear; | |
} | |
.butt-orange, .butt-orange:hover { | |
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); | |
color: #ffffff; | |
} | |
.butt.active, .butt:active { | |
background-image: none; | |
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); | |
-moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); | |
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); | |
background-color: #e6e6e6; | |
background-color: #d9d9d9 9; | |
outline: 0; | |
} | |
.butt-big { | |
font-size: 1.8em; | |
padding: 12px 20px 12px; | |
} | |
/*Buttons orange version -----------------------------------*/ | |
.butt-orange { | |
background-color: #ff9308; | |
background-image: -moz-linear-gradient(top, #ffad18, #ff7b00); | |
background-image: -ms-linear-gradient(top, #ffad18, #ff7b00); | |
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffad18), to(#ff7b00)); | |
background-image: -webkit-linear-gradient(top, #ffad18, #ff7b00); | |
background-image: -o-linear-gradient(top, #ffad18, #ff7b00); | |
background-image: linear-gradient(top, #ffad18, #ff7b00); | |
background-repeat: repeat-x; | |
border-color: #ff7b00 #ff7b00 #003580; | |
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); | |
} | |
.butt-orange:active { | |
background-color:#ff7b00; | |
} | |
.butt-orange:hover { | |
background-color: #ff7b00; | |
} | |
.butt-orange:focus { | |
outline: thin dotted #333; | |
outline: 5px auto -webkit-focus-ring-color; | |
outline-offset: -2px; | |
} | |
/*widget selectior -----------------------------------*/ | |
.unit-selector { | |
clear:both; | |
-webkit-touch-callout: none; | |
-webkit-user-select: none; | |
-khtml-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
user-select: none; | |
} | |
.unit-selector--plus, .unit-selector--less { | |
cursor: pointer; | |
} | |
.unit-selector--plus, .unit-selector--less, .unit-selector--units { | |
display: inline-block; | |
float: left; | |
line-height: 1em; | |
*display: inline; | |
/* IE7 inline-block hack */ | |
*zoom: 1; | |
} | |
.disabled .unit-selector--plus, .disabled .unit-selector--less { | |
color: #ccc; | |
cursor: default; | |
} | |
/* Huge version (.u_sBig) -----------------------------------*/ | |
.unit-selector.u_sBig { | |
-webkit-border-radius: 20px; | |
-moz-border-radius: 20px; | |
border-radius: 20px; | |
color: #555555; | |
font-size:2em; | |
} | |
.u_sBig .unit-selector--units { | |
padding: 10px 11px 8px 0; | |
width: 40px; | |
text-align:right; | |
background-color:white; | |
border-bottom:1px solid #f2f2f2; | |
border-left:1px solid #f4f4f4; | |
-moz-border-radius-topleft: 20px; | |
-moz-border-radius-bottomleft: 20px; | |
-webkit-border-radius: 20px 0 0 20px; | |
border-radius: 20px 0 0 20px; | |
-webkit-box-shadow: inset 0px 2px 2px 0px #ccc; | |
-moz-box-shadow: inset 0px 2px 2px 0px #ccc; | |
box-shadow: inset 0px 2px 2px 0px #ccc; | |
} | |
.u_sBig .unit-selector--plus, .u_sBig .unit-selector--less { | |
overflow-x: hidden; | |
padding: 11px; | |
border-bottom:1px solid #ddd; | |
font-weight:bold; | |
text-shadow: 1px 1px 1px #fff; | |
color: #999999; | |
background: #f3f3f3; | |
background: -moz-linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f3f3f3), color-stop(100%, #ececec)); | |
background: -webkit-linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
background: -o-linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
background: -ms-linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
background: linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
-webkit-box-shadow: inset 0px 2px 2px 0px #ccc; | |
-moz-box-shadow: inset 0px 2px 2px 0px #ccc; | |
box-shadow: inset 0px 2px 2px 0px #ccc; | |
} | |
.u_sBig .unit-selector--less { | |
padding:9px 13px 9px 13px; | |
} | |
.u_sBig .unit-selector--plus { | |
padding: 9px 14px 9px 11px; | |
-webkit-box-shadow: inset 0px 2px 2px 0px #ccc, inset 11px 0px 2px -10px #fff; | |
-moz-box-shadow: inset 0px 2px 2px 0px #ccc, inset 11px 0px 2px -10px #fff; | |
box-shadow: inset 0px 2px 2px 0px #ccc, inset 11px 0px 2px -10px #fff; | |
-moz-border-radius-topright: 20px; | |
-moz-border-radius-bottomright: 20px; | |
-webkit-border-radius: 0 20px 20px 0; | |
border-radius: 0 20px 20px 0; | |
} | |
.u_sBig .unit-selector--plus:hover, .u_sBig .unit-selector--less:hover { | |
color: white; | |
text-shadow: 0 0 5px #ffffff; | |
border-bottom: 0; | |
-webkit-transition: -webkit-box-shadow .1s linear; | |
-moz-transition: -moz-box-shadow 31s linear; | |
-o-transition: -o-box-shadow 31s linear; | |
transition: box-shadow .1s linear; | |
-webkit-box-shadow: inset 0px 2px 3px 0px #006cc1, inset 0px 0px 0px 1px #006CC1, inset 0px 3px 0px -1px #fff, 0 2px 3px #666; | |
-moz-box-shadow: inset 0px 2px 3px 0px #006cc1, inset 0px 0px 0px 1px #006CC1, inset 0px 3px 0px -1px #fff, 0 2px 3px #666; | |
box-shadow: inset 0px 2px 3px 0px #006cc1, inset 0px 0px 0px 1px #006CC1, inset 0px 3px 0px -1px #fff, 0 2px 3px #666; | |
background: #0087d4; | |
background: -moz-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0087d4), color-stop(100%, #0077cb)); | |
background: -webkit-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -o-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -ms-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
} | |
.u_sBig .unit-selector--plus:active, .u_sBig .unit-selector--less:active { | |
color: white; | |
text-shadow: 0 0 5px #ffffff; | |
-webkit-transition: -webkit-box-shadow .1s linear; | |
-moz-transition: -moz-box-shadow 31s linear; | |
-o-transition: -o-box-shadow 31s linear; | |
transition: box-shadow .1s linear; | |
-webkit-box-shadow: inset 0px 2px 3px 0px #006cc1, inset 0px 0px 0px 1px #006CC1, inset 0px 3px 0px -1px #fff, inset 0 3px 3px #333; | |
-moz-box-shadow: inset 0px 2px 3px 0px #006cc1, inset 0px 0px 0px 1px #006CC1, inset 0px 3px 0px -1px #fff, inset 0 3px 3px #333; | |
box-shadow: inset 0px 2px 3px 0px #006cc1, inset 0px 0px 0px 1px #006CC1, inset 0px 3px 0px -1px #fff, inset 0 3px 3px #333; | |
} | |
.u_sBig .unit-selector--plus:hover { | |
-moz-border-radius-topright: 20px; | |
-moz-border-radius-bottomright: 20px; | |
-webkit-border-radius: 0px 20px 20px 0px; | |
border-radius: 0px 20px 20px 0px; | |
} | |
/* Normal version (.u_sNorm)-----------------------------------*/ | |
.unit-selector.u_sNorm { | |
-webkit-border-radius: 20px; | |
-moz-border-radius: 20px; | |
border-radius: 20px; | |
color: #555555; | |
font-size: 1.7em; | |
position:relative; | |
z-index:2; | |
} | |
.u_sNorm .unit-selector--units { | |
padding: 10px 11px 8px 0; | |
width: 35px; | |
text-align:right; | |
background-color:white; | |
border-bottom:1px solid #f2f2f2; | |
border-left:1px solid #f4f4f4; | |
border-top:1px solid #f4f4f4; | |
-moz-border-radius-topleft: 4px; | |
-moz-border-radius-bottomleft: 4px; | |
-webkit-border-radius: 4px 0 0 4px; | |
border-radius: 4px 0 0 4px; | |
} | |
.u_sNorm .unit-selector--plus, .u_sNorm .unit-selector--less { | |
overflow-x: hidden; | |
padding: 11px; | |
border-bottom:1px solid #ddd; | |
font-weight:bold; | |
text-shadow: 1px 1px 1px #fff; | |
color: #666666; | |
background: #f3f3f3; | |
background: -moz-linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f3f3f3), color-stop(100%, #ececec)); | |
background: -webkit-linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
background: -o-linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
background: -ms-linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
background: linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
} | |
.u_sNorm .unit-selector--less { | |
padding: 9px 8px 9px 11px; | |
border-left: 1px solid #ddd; | |
border-top: 1px solid #ddd; | |
border-bottom: 1px solid #ddd; | |
} | |
.u_sNorm .unit-selector--plus { | |
padding: 11px 10px 7px 3px; | |
border-right: 1px solid #ddd; | |
border-top: 1px solid #ddd; | |
border-bottom: 1px solid #ddd; | |
-moz-border-radius-topright: 4px; | |
-moz-border-radius-bottomright: 4px; | |
-webkit-border-radius: 0 4px 4px 0; | |
border-radius: 0 4px 4px 0; | |
} | |
.u_sNorm:hover .unit-selector--plus { | |
color: #004881; | |
-webkit-box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF; | |
-moz-box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF; | |
box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF; | |
background: #0087d4; | |
background: -moz-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0087d4), color-stop(100%, #0077cb)); | |
background: -webkit-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -o-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -ms-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
} | |
.u_sNorm:hover .unit-selector--less { | |
color: #004881; | |
-webkit-box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff; | |
-moz-box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff; | |
box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff; | |
background: #0087d4; | |
background: -moz-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0087d4), color-stop(100%, #0077cb)); | |
background: -webkit-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -o-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -ms-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
} | |
.u_sNorm .unit-selector--plus:hover { | |
text-shadow: 0 0 5px #ffffff; | |
color: white; | |
-webkit-box-shadow: inset 0px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff, inset -10px 0px 6px -9px #333; | |
-moz-box-shadow: inset 0px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff, inset -10px 0px 6px -9px #333; | |
box-shadow: inset 0px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff, inset -10px 0px 6px -9px #333; | |
} | |
.u_sNorm .unit-selector--less:hover { | |
text-shadow: 0 0 5px #ffffff; | |
color: white; | |
-webkit-box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff, inset 11px 0px 6px -9px #333; | |
-moz-box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff, inset 11px 0px 6px -9px #333; | |
box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff, inset 11px 0px 6px -9px #333; | |
} | |
.u_sNorm .unit-selector--plus:active { | |
text-shadow: 0 0 5px #ffffff; | |
color: white; | |
-webkit-box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF; | |
-moz-box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF; | |
box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF; | |
} | |
.u_sNorm .unit-selector--less:active { | |
text-shadow: 0 0 5px #ffffff; | |
color: white; | |
-webkit-box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff; | |
-moz-box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff; | |
box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff; | |
} | |
.u_sNorm .unit-selector--plus:hover::before { | |
content:''; | |
position: absolute; | |
display: block; | |
height: 35px; | |
width: 18px; | |
z-index: -1; | |
top: 3px; | |
background-color: #CCC; | |
-webkit-box-shadow: 3px 0px 5px 0px #ccc; | |
-moz-box-shadow: 3px 0px 5px 0px #ccc; | |
box-shadow: 3px 0px 5px 0px #ccc; | |
-ms-transform:skew(0, 6deg); | |
-moz-transform:skew(0, 6deg); | |
-webkit-transform:skew(0, 6deg); | |
-o-transform:skew(0, 6deg); | |
-webkit-border-radius: 3px; | |
-moz-border-radius: 3px; | |
border-radius: 3px; | |
} | |
.u_sNorm .unit-selector--less:hover::before { | |
content:''; | |
position: absolute; | |
display: block; | |
height: 35px; | |
width: 20px; | |
z-index: -1; | |
top: 3px; | |
background-color: #CCC; | |
-webkit-box-shadow: -10px 0px 5px 0px #ccc; | |
-moz-box-shadow: -10px 0px 5px 0px #ccc; | |
box-shadow: -10px 0px 5px 0px #ccc; | |
-ms-transform:skew(0, -6deg); | |
-moz-transform:skew(0, -6deg); | |
-webkit-transform:skew(0, -6deg); | |
-o-transform:skew(0, -6deg); | |
} | |
/* Small version (.u_sSmall) -----------------------------------*/ | |
.unit-selector.u_sSmall { | |
-webkit-border-radius: 20px; | |
-moz-border-radius: 20px; | |
border-radius: 20px; | |
color: #555555; | |
font-size: 1.5em; | |
position:relative; | |
z-index:2; | |
} | |
.u_sSmall .unit-selector--units { | |
padding:5px 6px 5px 6px; | |
width: 26px; | |
text-align:right; | |
background-color:white; | |
border-bottom:1px solid #f2f2f2; | |
border-left:1px solid #f4f4f4; | |
border-top:1px solid #f4f4f4; | |
-moz-border-radius-topleft: 4px; | |
-moz-border-radius-bottomleft: 4px; | |
-webkit-border-radius: 4px 0 0 4px; | |
border-radius: 4px 0 0 4px; | |
} | |
.u_sSmall .unit-selector--plus, .u_sSmall .unit-selector--less { | |
overflow-x: hidden; | |
padding: 11px; | |
border-bottom:1px solid #ddd; | |
font-weight:bold; | |
text-shadow: 1px 1px 1px #fff; | |
color: #666666; | |
background: #f3f3f3; | |
background: -moz-linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f3f3f3), color-stop(100%, #ececec)); | |
background: -webkit-linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
background: -o-linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
background: -ms-linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
background: linear-gradient(top, #f3f3f3 0%, #ececec 100%); | |
} | |
.u_sSmall .unit-selector--less { | |
padding: 4px 5px 6px 10px; | |
border-left: 1px solid #ddd; | |
border-top: 1px solid #ddd; | |
border-bottom: 1px solid #ddd; | |
} | |
.u_sSmall .unit-selector--plus { | |
padding: 6px 7px 4px 6px; | |
border-right: 1px solid #ddd; | |
border-top: 1px solid #ddd; | |
border-bottom: 1px solid #ddd; | |
-moz-border-radius-topright: 4px; | |
-moz-border-radius-bottomright: 4px; | |
-webkit-border-radius: 0 4px 4px 0; | |
border-radius: 0 4px 4px 0; | |
} | |
.u_sSmall:hover .unit-selector--plus { | |
color: #004881; | |
-webkit-box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF; | |
-moz-box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF; | |
box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF; | |
background: #0087d4; | |
background: -moz-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0087d4), color-stop(100%, #0077cb)); | |
background: -webkit-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -o-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -ms-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
} | |
.u_sSmall:hover .unit-selector--less { | |
color: #004881; | |
-webkit-box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff; | |
-moz-box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff; | |
box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff; | |
background: #0087d4; | |
background: -moz-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0087d4), color-stop(100%, #0077cb)); | |
background: -webkit-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -o-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: -ms-linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
background: linear-gradient(top, #0087d4 0%, #0077cb 100%); | |
} | |
.u_sSmall .unit-selector--plus:hover { | |
text-shadow: 0 0 5px #ffffff; | |
color: white; | |
-webkit-box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF, inset -10px 0px 6px -9px #333; | |
-moz-box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF, inset -10px 0px 6px -9px #333; | |
box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF, inset -10px 0px 6px -9px #333; | |
-moz-border-radius-topright: 4px; | |
-moz-border-radius-bottomright: 4px; | |
-webkit-border-radius: 0 4px 4px 0; | |
border-radius: 0 4px 4px 0; | |
} | |
.u_sSmall .unit-selector--less:hover { | |
text-shadow: 0 0 5px #ffffff; | |
color: white; | |
-webkit-box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff, inset 20px 0px 15px -10px #333; | |
-moz-box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff, inset 10px 0px 15px -10px #333; | |
box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff, inset 10px 0px 15px -10px #333; | |
} | |
.u_sSmall .unit-selector--plus::before { | |
content:''; | |
position: absolute; | |
display: block; | |
height: 25px; | |
width: 16px; | |
z-index: -1; | |
top: 3px; | |
} | |
.u_sSmall .unit-selector--less::before { | |
content:''; | |
position: absolute; | |
display: block; | |
height: 25px; | |
width: 18px; | |
z-index: -1; | |
top: 3px; | |
} | |
.u_sSmall .unit-selector--plus:hover::before { | |
background-color: #CCC; | |
-webkit-box-shadow: 2px 0px 5px 0px #ccc; | |
-moz-box-shadow: 2px 0px 5px 0px #ccc; | |
box-shadow: 2px 0px 5px 0px #ccc; | |
-ms-transform:skew(0, 5deg); | |
-moz-transform:skew(0, 5deg); | |
-webkit-transform:skew(0, 5deg); | |
-o-transform:skew(0, 5deg); | |
-webkit-border-radius: 3px; | |
-moz-border-radius: 3px; | |
border-radius: 3px; | |
} | |
.u_sSmall .unit-selector--less:hover::before { | |
background-color: #CCC; | |
-webkit-box-shadow: -10px 0px 5px 0px #ccc; | |
-moz-box-shadow: -10px 0px 5px 0px #ccc; | |
box-shadow: -10px 0px 5px 0px #ccc; | |
-ms-transform:skew(0, -6deg); | |
-moz-transform:skew(0, -6deg); | |
-webkit-transform:skew(0, -6deg); | |
-o-transform:skew(0, -6deg); | |
-webkit-border-radius: 3px; | |
-moz-border-radius: 3px; | |
border-radius: 3px; | |
} | |
.u_sSmall .unit-selector--plus:active { | |
text-shadow: 0 0 5px #ffffff; | |
color: white; | |
-webkit-box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF; | |
-moz-box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF; | |
box-shadow: inset -2px 2px 2px -1px #006cc1, inset -1px -1px 0px 0px #006CC1, inset 0px 3px 0px -1px #FFF; | |
} | |
.u_sSmall .unit-selector--less:active { | |
text-shadow: 0 0 5px #ffffff; | |
color: white; | |
-webkit-box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff; | |
-moz-box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff; | |
box-shadow: inset 2px 2px 2px -1px #006cc1, inset 0px 3px 0px -1px #fff; | |
} | |
.u_sSmall .unit-selector--plus:active::before { | |
background-color: #CCC; | |
-webkit-box-shadow: 0; | |
-moz-box-shadow: 0; | |
box-shadow: 0; | |
-ms-transform:skew(0, -5deg); | |
-moz-transform:skew(0, 0deg); | |
-webkit-transform:skew(0, 0deg); | |
-o-transform:skew(0, -0deg); | |
} | |
.u_sSmall .unit-selector--less:active::before { | |
background-color: #CCC; | |
-webkit-box-shadow: 0; | |
-moz-box-shadow: 0; | |
box-shadow: 0; | |
-ms-transform:skew(0, 0); | |
-moz-transform:skew(0, 0); | |
-webkit-transform:skew(0, 0); | |
-o-transform:skew(0, 0); | |
} | |
.disabled .unit-selector--less { | |
color:#ccc; | |
} | |
/* BORRAR -----------------------------------*/ | |
body { | |
background-color:#e5f1fb | |
} | |
.bg_blue { | |
padding:50px; | |
background-color:#e5f1fb | |
} | |
.bg_white { | |
margin: 50px; | |
border-radius:4px; | |
-webkit-box-shadow: 0px 2px 4px -1px #ACC4D2; | |
-moz-box-shadow: 0px 2px 4px -1px #ACC4D2; | |
box-shadow: 0px 2px 4px -1px #ACC4D2; | |
padding:50px; | |
background-color:white | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment