index.less 9.5 KB

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