components.less 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. @title-top: #3181ff;
  2. @title-bg: #e0ecff;
  3. @body-bg: #2382ff;
  4. // 移动端下拉菜单动画
  5. @keyframes nav {
  6. from {
  7. height: 0;
  8. }
  9. to {
  10. height: calc(~"100vh - 90px");
  11. }
  12. }
  13. @-webkit-keyframes nav
  14. /* Safari and Chrome */
  15. {
  16. from {
  17. height: 0;
  18. }
  19. to {
  20. height: calc(~"100vh - 90px");
  21. }
  22. }
  23. @-moz-keyframes nav
  24. /* Safari and Chrome */
  25. {
  26. from {
  27. height: 0;
  28. }
  29. to {
  30. height: calc(~"100vh - 90px");
  31. }
  32. }
  33. @keyframes navc {
  34. from {
  35. height: calc(~"100vh - 90px");
  36. }
  37. to {
  38. height: 0;
  39. }
  40. }
  41. @-webkit-keyframes navc
  42. /* Safari and Chrome */
  43. {
  44. from {
  45. height: calc(~"100vh - 90px");
  46. }
  47. to {
  48. height: 0;
  49. }
  50. }
  51. @-moz-keyframes navc
  52. /* Safari and Chrome */
  53. {
  54. from {
  55. height: calc(~"100vh - 90px");
  56. }
  57. to {
  58. height: 0;
  59. }
  60. }
  61. // js 操作添加
  62. .show {
  63. display: block !important;
  64. }
  65. .noshow {
  66. display: none !important;
  67. }
  68. body {
  69. height: 100vh;
  70. overflow-y: scroll;
  71. // 通用a标签
  72. a{
  73. text-decoration: none;
  74. color: #777;
  75. &:hover{
  76. color:@body-bg;
  77. text-decoration: none;
  78. }
  79. }
  80. &::-webkit-scrollbar {
  81. /*滚动条整体样式*/
  82. width: 5px;
  83. /*高宽分别对应横竖滚动条的尺寸*/
  84. height: 10px;
  85. }
  86. @media screen and (max-width:750px) {
  87. &::-webkit-scrollbar {
  88. /*滚动条整体样式*/
  89. width: 10px;
  90. /*高宽分别对应横竖滚动条的尺寸*/
  91. height: 10px;
  92. }
  93. }
  94. &::-webkit-scrollbar-thumb {
  95. /*滚动条里面小方块*/
  96. border-radius: 10px;
  97. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  98. background: #999;
  99. }
  100. // 2382ff
  101. &::-webkit-scrollbar-thumb:hover {
  102. background: @body-bg;
  103. }
  104. &::-webkit-scrollbar-track {
  105. /*滚动条里面轨道*/
  106. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  107. border-radius: 10px;
  108. background: #eee;
  109. }
  110. }
  111. // 头部
  112. .header {
  113. width: 100%;
  114. background-color: #fff;
  115. border-bottom: 1px solid #f1f1f1;
  116. background-color: #fff;
  117. position: fixed;
  118. z-index: 1;
  119. .ha-item {
  120. margin-top: 10px;
  121. height: 70px;
  122. .img {
  123. height: 100%;
  124. span {
  125. font-size: 50px;
  126. font-weight: bold;
  127. color: @body-bg;
  128. }
  129. img {
  130. height: 100%;
  131. }
  132. }
  133. .button {
  134. display: none;
  135. @media screen and (max-width:750px) {
  136. & {
  137. display: block;
  138. }
  139. }
  140. .button {
  141. color: @body-bg;
  142. padding: 10px;
  143. border: 2px solid @body-bg;
  144. text-align: center;
  145. font-size: 30px;
  146. border-radius: 5px;
  147. }
  148. }
  149. .app {
  150. height: 100%;
  151. text-align: center;
  152. @media screen and (max-width:750px) {
  153. & {
  154. display: none;
  155. }
  156. }
  157. a {
  158. text-decoration: none;
  159. color: @body-bg;
  160. img {
  161. width: 50px;
  162. }
  163. }
  164. }
  165. }
  166. .hb-item {
  167. // 大屏下拉菜单
  168. .nav {
  169. display: flex;
  170. justify-content: flex-start;
  171. align-content: center;
  172. @media screen and (max-width:750px) {
  173. & {
  174. display: none;
  175. }
  176. }
  177. &>.nav-item>a.active{
  178. color: @body-bg;
  179. }
  180. .nav-item {
  181. padding: 0 20px;
  182. a {
  183. color: #777;
  184. font-weight: bold;
  185. text-decoration: none;
  186. line-height: 40px;
  187. display: table-cell;
  188. vertical-align: bottom;
  189. font-size: 18px;
  190. i {
  191. margin-left: 5px;
  192. }
  193. &:hover {
  194. color: @body-bg;
  195. }
  196. }
  197. .nav-ul {
  198. display: none;
  199. overflow: hidden;
  200. padding: 0;
  201. position: absolute;
  202. z-index: 1;
  203. background-color: #fff;
  204. overflow: auto !important;
  205. .nav-li {
  206. width: 100px;
  207. padding: 10px;
  208. list-style: none;
  209. &:hover {
  210. background-color: @body-bg;
  211. a {
  212. color: #fff;
  213. }
  214. }
  215. a {
  216. color: #777;
  217. line-height: 15px;
  218. font-size: small;
  219. }
  220. }
  221. }
  222. }
  223. }
  224. }
  225. }
  226. // 小屏幕下拉菜单
  227. // 移动端下拉菜单
  228. #nav-sm {
  229. position: fixed;
  230. z-index: 99;
  231. width: 100vw;
  232. overflow-y: scroll;
  233. @media screen and (max-width:768px) {
  234. & {
  235. border-top: 1px solid #eee;
  236. }
  237. }
  238. &::-webkit-scrollbar {
  239. height: 0;
  240. }
  241. box-sizing: border-box;
  242. background-color: #fff;
  243. margin-top: 80px;
  244. padding: 0;
  245. &>ul>li>a.active{
  246. color: @body-bg;
  247. }
  248. ul {
  249. li {
  250. list-style-type: none;
  251. a {
  252. font-weight: bold;
  253. font-size: 20px;
  254. font-size: 16px;
  255. line-height: 40px;
  256. color: #555;
  257. text-decoration: none;
  258. &:hover {
  259. color: @body-bg;
  260. }
  261. }
  262. .nav-sm-ul {
  263. display: flex;
  264. justify-content: flex-start;
  265. align-items: center;
  266. flex-wrap: wrap;
  267. padding: 0;
  268. .nav-sm-li {
  269. padding: 0 10px;
  270. a {
  271. font-size: 14px;
  272. font-weight: normal;
  273. }
  274. }
  275. }
  276. }
  277. }
  278. }
  279. .nav-sm-noheight {
  280. height: 0px;
  281. }
  282. .nav-sm-show {
  283. height: calc(~"100vh - 80px");
  284. animation: nav 1s;
  285. -webkit-animation: nav 1s normal;
  286. -moz-animation: nav 1s;
  287. }
  288. .nav-sm-noshow {
  289. height: 0px;
  290. animation: navc 1s;
  291. -webkit-animation: navc 1s normal;
  292. -moz-animation: navc 1s;
  293. }
  294. // 主题默认样式
  295. .body {
  296. background-color: #fff;
  297. max-width: 1200px;
  298. min-height: 600px;
  299. overflow: hidden;
  300. position: relative;
  301. padding: 10px 15px 15px;
  302. margin: 141px 20px 20px;
  303. @media screen and (max-width:768px) {
  304. & {
  305. padding: 0px;
  306. border-radius: 10px 10px 0 0;
  307. margin: 100px 20px 20px;
  308. }
  309. }
  310. }
  311. .footer {
  312. width: 100%;
  313. box-sizing: border-box;
  314. overflow: hidden;
  315. background-color: #fff;
  316. border-top: 1px solid #f1f1f1;
  317. text-align: center;
  318. color: #777;
  319. p {
  320. margin: 0;
  321. padding: 20px 0px 0px;
  322. }
  323. &>p:last-child {
  324. padding-bottom: 50px;
  325. }
  326. }
  327. // 顶部
  328. #top {
  329. position: fixed;
  330. bottom: 30px;
  331. right: 30px;
  332. padding: 20px;
  333. color: #fff;
  334. background-color: rgba(98, 96, 96, 0.3);
  335. border-radius: 10px;
  336. }
  337. // 分享功能
  338. #share {
  339. position: fixed;
  340. top: 60vh;
  341. right: 0px;
  342. box-sizing: border-box;
  343. display: flex;
  344. @media screen and (max-width:768px) {
  345. & {
  346. display: none;
  347. }
  348. }
  349. div {
  350. height: 132px;
  351. box-sizing: border-box;
  352. background-color: @body-bg;
  353. color: #fff;
  354. font-size: 15px;
  355. width: 30px;
  356. letter-spacing: 10px;
  357. text-align: center;
  358. line-height: 30px;
  359. border-radius: 5px 0 0 5px;
  360. writing-mode: vertical-lr;
  361. /*从左向右 从右向左是 writing-mode: vertical-rl;*/
  362. writing-mode: tb-lr;
  363. /*IE浏览器的从左向右 从右向左是 writing-mode: tb-rl;*/
  364. }
  365. ul {
  366. width: 0px;
  367. height: 132px;
  368. border: 1px solid #aaa;
  369. box-sizing: border-box;
  370. border-right: none;
  371. list-style: none;
  372. padding: 0;
  373. box-sizing: border-box;
  374. &>li:first-child {
  375. background-color: #c6c6c6;
  376. line-height: 26px;
  377. font-weight: bold;
  378. }
  379. li {
  380. padding: 5px 10px;
  381. width: 100px;
  382. vertical-align: middle;
  383. img {
  384. width: 20px;
  385. vertical-align: middle;
  386. margin-right: 5px;
  387. }
  388. &:hover:not(ul>li:first-child) {
  389. background-color: #e6e6e6;
  390. }
  391. }
  392. }
  393. // width: 100px;height: 100px;
  394. }
  395. // 交互板
  396. #toast{
  397. display: none;
  398. position: fixed;
  399. top: 0;
  400. left: 0;
  401. z-index: 100;
  402. width: 100vw;
  403. height: 100vh;
  404. background-color: rgba(29, 27, 27, 0.5) ;
  405. text-align: center;
  406. div{
  407. background-color: #fff;
  408. position: absolute;
  409. padding: 5px;
  410. border-radius: 5px;
  411. width: 260px;
  412. // box-shadow: 0px 0px 5px #fff;
  413. left: calc(~"50vw - 130px");
  414. top: 30vh;
  415. }
  416. }