components.less 8.4 KB

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