hotbox.less 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. .hotbox {
  2. font-family: Arial, "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  3. position: absolute;
  4. left: 0;
  5. top: 0;
  6. overflow: visible;
  7. .state {
  8. position: absolute;
  9. overflow: visible;
  10. display: none;
  11. .center, .ring {
  12. .button {
  13. position: absolute;
  14. width: 70px;
  15. height: 70px;
  16. margin-left: -35px;
  17. margin-top: -35px;
  18. border-radius: 100%;
  19. box-shadow: 0 0 30px rgba(0, 0, 0, .3);
  20. }
  21. .label, .key {
  22. display: block;
  23. text-align: center;
  24. line-height: 1.4em;
  25. vertical-align: middle;
  26. }
  27. .label {
  28. font-size: 16px;
  29. margin-top: 17px;
  30. color: black;
  31. font-weight: normal;
  32. line-height: 1em;
  33. }
  34. .key {
  35. font-size: 12px;
  36. color: #999;
  37. }
  38. }
  39. .ring-shape {
  40. position: absolute;
  41. left: -25px;
  42. top: -25px;
  43. border: 25px solid rgba(0, 0, 0, .3);
  44. border-radius: 100%;
  45. box-sizing: content-box;
  46. }
  47. .top, .bottom {
  48. position: absolute;
  49. white-space: nowrap;
  50. .button {
  51. display: inline-block;
  52. padding: 8px 15px;
  53. margin: 0 10px;
  54. border-radius: 15px;
  55. box-shadow: 0 0 30px rgba(0, 0, 0, .3);
  56. position: relative;
  57. .label {
  58. font-size: 14px;
  59. line-height: 14px;
  60. vertical-align: middle;
  61. color: black;
  62. line-height: 1em;
  63. }
  64. .key {
  65. font-size: 12px;
  66. line-height: 12px;
  67. vertical-align: middle;
  68. color: #999;
  69. margin-left: 3px;
  70. &:before {
  71. content: '(';
  72. }
  73. &:after {
  74. content: ')';
  75. }
  76. }
  77. }
  78. }
  79. .button {
  80. background: #F9F9F9;
  81. overflow: hidden;
  82. cursor: default;
  83. .key, .label {
  84. opacity: 0.3;
  85. }
  86. }
  87. .button.enabled {
  88. background: white;
  89. .key, .label {
  90. opacity: 1;
  91. }
  92. &:hover {
  93. background: lighten(rgb(228, 93, 92), 5%);
  94. .label {
  95. color: white;
  96. }
  97. .key {
  98. color: lighten(rgb(228, 93, 92), 30%);
  99. }
  100. }
  101. &.selected {
  102. -webkit-animation: selected .1s ease;
  103. background: rgb(228, 93, 92);
  104. .label {
  105. color: white;
  106. }
  107. .key {
  108. color: lighten(rgb(228, 93, 92), 30%);
  109. }
  110. }
  111. &.pressed, &:active {
  112. background: #FF974D;
  113. .label {
  114. color: white;
  115. }
  116. .key {
  117. color: lighten(#FF974D, 30%);
  118. }
  119. }
  120. }
  121. }
  122. .state.active {
  123. display: block;
  124. }
  125. }
  126. @-webkit-keyframes selected {
  127. 0% { transform: scale(1); }
  128. 50% { transform: scale(1.1); }
  129. 100% { transform: scale(1); }
  130. }
  131. .hotbox-key-receiver {
  132. position: absolute;
  133. left: -999999px;
  134. top: -999999px;
  135. width: 20px;
  136. height: 20px;
  137. outline: none;
  138. margin: 0;
  139. }