button.css 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. .centered {
  2. margin:50px auto;
  3. text-align:center;
  4. }
  5. .button::-moz-focus-inner{
  6. border: 0;
  7. padding: 0;
  8. }
  9. .button{
  10. display: inline-block;
  11. *display: inline;
  12. zoom: 1;
  13. padding: 6px 20px;
  14. margin: 0;
  15. cursor: pointer;
  16. border: 1px solid #bbb;
  17. overflow: visible;
  18. font: bold 13px arial, helvetica, sans-serif;
  19. text-decoration: none;
  20. white-space: nowrap;
  21. color: #555;
  22. background-color: #ddd;
  23. background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,1)), to(rgba(255,255,255,0)));
  24. background-image: -webkit-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
  25. background-image: -moz-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
  26. background-image: -ms-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
  27. background-image: -o-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
  28. background-image: linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
  29. -webkit-transition: background-color .2s ease-out;
  30. -moz-transition: background-color .2s ease-out;
  31. -ms-transition: background-color .2s ease-out;
  32. -o-transition: background-color .2s ease-out;
  33. transition: background-color .2s ease-out;
  34. background-clip: padding-box; /* Fix bleeding */
  35. -moz-border-radius: 3px;
  36. -webkit-border-radius: 3px;
  37. border-radius: 3px;
  38. -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
  39. -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
  40. box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
  41. text-shadow: 0 1px 0 rgba(255,255,255, .9);
  42. -webkit-touch-callout: none;
  43. -webkit-user-select: none;
  44. -khtml-user-select: none;
  45. -moz-user-select: none;
  46. -ms-user-select: none;
  47. user-select: none;
  48. }
  49. .button:hover{
  50. background-color: #eee;
  51. color: #555;
  52. }
  53. .button:active{
  54. background: #e9e9e9;
  55. position: relative;
  56. top: 1px;
  57. text-shadow: none;
  58. -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
  59. -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
  60. box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
  61. }
  62. .button[disabled], .button[disabled]:hover, .button[disabled]:active{
  63. border-color: #eaeaea;
  64. background: #fafafa;
  65. cursor: default;
  66. position: static;
  67. color: #999;
  68. /* Usually, !important should be avoided but here it's really needed :) */
  69. -moz-box-shadow: none !important;
  70. -webkit-box-shadow: none !important;
  71. box-shadow: none !important;
  72. text-shadow: none !important;
  73. }
  74. /* Smaller buttons styles */
  75. .button.small{
  76. padding: 4px 12px;
  77. }
  78. /* Larger buttons styles */
  79. .button.large{
  80. padding: 12px 30px;
  81. text-transform: uppercase;
  82. }
  83. .button.large:active{
  84. top: 2px;
  85. }
  86. /* Colored buttons styles */
  87. .button.green, .button.red, .button.blue {
  88. color: #fff;
  89. text-shadow: 0 1px 0 rgba(0,0,0,.2);
  90. background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,.3)), to(rgba(255,255,255,0)));
  91. background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
  92. background-image: -moz-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
  93. background-image: -ms-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
  94. background-image: -o-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
  95. background-image: linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
  96. }
  97. /* */
  98. .button.green{
  99. background-color: #57a957;
  100. border-color: #57a957;
  101. }
  102. .button.green:hover{
  103. background-color: #62c462;
  104. }
  105. .button.green:active{
  106. background: #57a957;
  107. }
  108. /* */
  109. .button.red{
  110. background-color: #ca3535;
  111. border-color: #c43c35;
  112. }
  113. .button.red:hover{
  114. background-color: #ee5f5b;
  115. }
  116. .button.red:active{
  117. background: #c43c35;
  118. }
  119. /* */
  120. .button.blue{
  121. background-color: #269CE9;
  122. border-color: #269CE9;
  123. }
  124. .button.blue:hover{
  125. background-color: #70B9E8;
  126. }
  127. .button.blue:active{
  128. background: #269CE9;
  129. }
  130. /* */
  131. .green[disabled], .green[disabled]:hover, .green[disabled]:active{
  132. border-color: #57A957;
  133. background: #57A957;
  134. color: #D2FFD2;
  135. }
  136. .red[disabled], .red[disabled]:hover, .red[disabled]:active{
  137. border-color: #C43C35;
  138. background: #C43C35;
  139. color: #FFD3D3;
  140. }
  141. .blue[disabled], .blue[disabled]:hover, .blue[disabled]:active{
  142. border-color: #269CE9;
  143. background: #269CE9;
  144. color: #93D5FF;
  145. }
  146. /* Group buttons */
  147. .button-group,
  148. .button-group li{
  149. display: inline-block;
  150. *display: inline;
  151. zoom: 1;
  152. }
  153. .button-group{
  154. font-size: 0; /* Inline block elements gap - fix */
  155. margin: 0;
  156. padding: 0;
  157. background: rgba(0, 0, 0, .1);
  158. border-bottom: 1px solid rgba(0, 0, 0, .1);
  159. padding: 7px;
  160. -moz-border-radius: 7px;
  161. -webkit-border-radius: 7px;
  162. border-radius: 7px;
  163. }
  164. .button-group li{
  165. margin-right: -1px; /* Overlap each right button border */
  166. }
  167. .button-group .button{
  168. font-size: 13px; /* Set the font size, different from inherited 0 */
  169. -moz-border-radius: 0;
  170. -webkit-border-radius: 0;
  171. border-radius: 0;
  172. }
  173. .button-group .button:active{
  174. -moz-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
  175. -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
  176. box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
  177. }
  178. .button-group li:first-child .button{
  179. -moz-border-radius: 3px 0 0 3px;
  180. -webkit-border-radius: 3px 0 0 3px;
  181. border-radius: 3px 0 0 3px;
  182. }
  183. .button-group li:first-child .button:active{
  184. -moz-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
  185. -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
  186. box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
  187. }
  188. .button-group li:last-child .button{
  189. -moz-border-radius: 0 3px 3px 0;
  190. -webkit-border-radius: 0 3px 3px 0;
  191. border-radius: 0 3px 3px 0;
  192. }
  193. .button-group li:last-child .button:active{
  194. -moz-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset;
  195. -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset;
  196. box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset;
  197. }