style.less 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. @navHeight: 60px;
  2. @fontSize: 18px;
  3. @lineHeight: 1.4;
  4. @white: #FFF;
  5. @darkGray: #333;
  6. @gray: #CCCCCC;
  7. .noGap(){
  8. font-size: 0;
  9. line-height: 0;
  10. letter-spacing: -.3em;
  11. }
  12. .reGap(@fz:@fontSize,@lh:@lineHeight){
  13. font-size: @fz;
  14. line-height: @lh;
  15. letter-spacing: normal;
  16. }
  17. .box-sizing(@v) {
  18. -moz-box-sizing: @v;
  19. box-sizing: @v;
  20. }
  21. html,
  22. body {
  23. padding: 0;
  24. margin: 0;
  25. }
  26. body {
  27. -webkit-font-smoothing: antialiased;
  28. text-align: center;
  29. font: @fontSize / @lineHeight 'Helvetica', 'Arial', sans-serif;
  30. padding-top: @navHeight;
  31. }
  32. ul{
  33. position: fixed;
  34. top: 0;
  35. left: 0;
  36. right: 0;
  37. margin: 0;
  38. padding: 0;
  39. height: @navHeight;
  40. background: @gray;
  41. .noGap;
  42. }
  43. li{
  44. position: relative;
  45. display: inline-block;
  46. vertical-align: top;
  47. width: (100% / 4);
  48. text-align: center;
  49. .reGap(@fontSize, @navHeight);
  50. a {
  51. display: block;
  52. color: @white;
  53. text-decoration: none;
  54. text-transform: uppercase;
  55. white-space: nowrap;
  56. &:hover,
  57. &.active{
  58. background: @darkGray;
  59. color: @white;
  60. }
  61. &.active{
  62. &:after{
  63. content: '';
  64. position: absolute;
  65. top: 100%;
  66. left: 50%;
  67. margin-left: -10px;
  68. border: 10px solid;
  69. border-color: transparent;
  70. border-top-color: @darkGray;
  71. }
  72. }
  73. }
  74. }
  75. .chart{
  76. position: relative;
  77. display: inline-block;
  78. width: 110px;
  79. height: 110px;
  80. margin-top: 50px;
  81. margin-bottom: 50px;
  82. text-align: center;
  83. canvas {
  84. position: absolute;
  85. top: 0;
  86. left: 0;
  87. }
  88. }
  89. .percent{
  90. display: inline-block;
  91. line-height: 110px;
  92. z-index: 2;
  93. &:after{
  94. content: '%';
  95. margin-left: 0.1em;
  96. font-size: .8em;
  97. }
  98. }
  99. .angular{
  100. margin-top: 100px;
  101. .chart{
  102. margin-top: 0;
  103. }
  104. }
  105. input{
  106. display: block;
  107. margin: auto;
  108. margin-bottom: 3em;
  109. }
  110. .btn {
  111. display: block;
  112. width: 200px;
  113. margin: 0 auto;
  114. padding: 10px 20px;
  115. background: @gray;
  116. color: @white;
  117. text-transform: uppercase;
  118. cursor: pointer;
  119. font-size: 0.8em;
  120. .box-sizing(border-box);
  121. &:hover{
  122. background: @darkGray;
  123. color: @white;
  124. }
  125. }
  126. .span6 {
  127. float: left;
  128. width: 50%;
  129. }
  130. @media only screen and (max-width: 600px) {
  131. li{
  132. font-size: (@fontSize * .8);
  133. }
  134. }
  135. @media only screen and (max-width: 430px) {
  136. .span6 {
  137. float: none;
  138. width: 100%;
  139. }
  140. body{
  141. padding-top: 0;
  142. }
  143. ul{
  144. height: auto;
  145. position: static;
  146. }
  147. li{
  148. display: block;
  149. width: 100%;
  150. }
  151. li a{
  152. white-space: normal;
  153. }
  154. a.active:after{
  155. display: none;
  156. }
  157. }