@title-top: #3181ff; @title-bg: #e0ecff; @body-bg: #2382ff; // 移动端下拉菜单动画 @keyframes nav { from { height: 0; } to { height: calc(~"100vh - 90px"); } } @-webkit-keyframes nav /* Safari and Chrome */ { from { height: 0; } to { height: calc(~"100vh - 90px"); } } @-moz-keyframes nav /* Safari and Chrome */ { from { height: 0; } to { height: calc(~"100vh - 90px"); } } @keyframes navc { from { height: calc(~"100vh - 90px"); } to { height: 0; } } @-webkit-keyframes navc /* Safari and Chrome */ { from { height: calc(~"100vh - 90px"); } to { height: 0; } } @-moz-keyframes navc /* Safari and Chrome */ { from { height: calc(~"100vh - 90px"); } to { height: 0; } } // js 操作添加 .show { display: block !important; } .noshow { display: none !important; } body { height: 100vh; overflow-y: scroll; // 通用a标签 a{ text-decoration: none; color: #777; &:hover{ color:@body-bg; text-decoration: none; } } &::-webkit-scrollbar { /*滚动条整体样式*/ width: 5px; /*高宽分别对应横竖滚动条的尺寸*/ height: 10px; } @media screen and (max-width:750px) { &::-webkit-scrollbar { /*滚动条整体样式*/ width: 10px; /*高宽分别对应横竖滚动条的尺寸*/ height: 10px; } } &::-webkit-scrollbar-thumb { /*滚动条里面小方块*/ border-radius: 10px; -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); background: #999; } // 2382ff &::-webkit-scrollbar-thumb:hover { background: @body-bg; } &::-webkit-scrollbar-track { /*滚动条里面轨道*/ -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); border-radius: 10px; background: #eee; } } // 头部 .header { width: 100%; background-color: #fff; border-bottom: 1px solid #f1f1f1; background-color: #fff; position: fixed; z-index: 1; .ha-item { margin-top: 10px; height: 70px; .img { height: 100%; span { font-size: 50px; font-weight: bold; color: @body-bg; } img { height: 100%; } } .button { display: none; @media screen and (max-width:750px) { & { display: block; } } .button { color: @body-bg; padding: 10px; border: 2px solid @body-bg; text-align: center; font-size: 30px; border-radius: 5px; } } .app { height: 100%; text-align: center; @media screen and (max-width:750px) { & { display: none; } } a { text-decoration: none; color: @body-bg; img { width: 50px; } } } } .hb-item { // 大屏下拉菜单 .nav { display: flex; justify-content: flex-start; align-content: center; @media screen and (max-width:750px) { & { display: none; } } &>.nav-item>a.active{ color: @body-bg; } .nav-item { padding: 0 20px; a { color: #777; font-weight: bold; text-decoration: none; line-height: 40px; display: table-cell; vertical-align: bottom; font-size: 18px; i { margin-left: 5px; } &:hover { color: @body-bg; } } .nav-ul { display: none; overflow: hidden; padding: 0; position: absolute; z-index: 1; background-color: #fff; overflow: auto !important; .nav-li { width: 100px; padding: 10px; list-style: none; &:hover { background-color: @body-bg; a { color: #fff; } } a { color: #777; line-height: 15px; font-size: small; } } } } } } } // 小屏幕下拉菜单 // 移动端下拉菜单 #nav-sm { position: fixed; z-index: 99; width: 100vw; overflow-y: scroll; @media screen and (max-width:768px) { & { border-top: 1px solid #eee; } } &::-webkit-scrollbar { height: 0; } box-sizing: border-box; background-color: #fff; margin-top: 80px; padding: 0; &>ul>li>a.active{ color: @body-bg; } ul { li { list-style-type: none; a { font-weight: bold; font-size: 20px; font-size: 16px; line-height: 40px; color: #555; text-decoration: none; &:hover { color: @body-bg; } } .nav-sm-ul { display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; padding: 0; .nav-sm-li { padding: 0 10px; a { font-size: 14px; font-weight: normal; } } } } } } .nav-sm-noheight { height: 0px; } .nav-sm-show { height: calc(~"100vh - 80px"); animation: nav 1s; -webkit-animation: nav 1s normal; -moz-animation: nav 1s; } .nav-sm-noshow { height: 0px; animation: navc 1s; -webkit-animation: navc 1s normal; -moz-animation: navc 1s; } // 主题默认样式 .body { background-color: #fff; max-width: 1200px; min-height: 600px; overflow: hidden; position: relative; padding: 10px 15px 15px; margin: 141px 20px 20px; @media screen and (max-width:768px) { & { padding: 0px; border-radius: 10px 10px 0 0; margin: 100px 20px 20px; } } } .footer { width: 100%; box-sizing: border-box; overflow: hidden; background-color: #fff; border-top: 1px solid #f1f1f1; text-align: center; color: #777; p { margin: 0; padding: 20px 0px 0px; } &>p:last-child { padding-bottom: 50px; } } // 顶部 #top { position: fixed; bottom: 30px; right: 30px; padding: 20px; color: #fff; background-color: rgba(98, 96, 96, 0.3); border-radius: 10px; } // 分享功能 #share { position: fixed; top: 60vh; right: 0px; box-sizing: border-box; display: flex; @media screen and (max-width:768px) { & { display: none; } } div { height: 132px; box-sizing: border-box; background-color: @body-bg; color: #fff; font-size: 15px; width: 30px; letter-spacing: 10px; text-align: center; line-height: 30px; border-radius: 5px 0 0 5px; writing-mode: vertical-lr; /*从左向右 从右向左是 writing-mode: vertical-rl;*/ writing-mode: tb-lr; /*IE浏览器的从左向右 从右向左是 writing-mode: tb-rl;*/ } ul { width: 0px; height: 132px; border: 1px solid #aaa; box-sizing: border-box; border-right: none; list-style: none; padding: 0; box-sizing: border-box; &>li:first-child { background-color: #c6c6c6; line-height: 26px; font-weight: bold; } li { padding: 5px 10px; width: 100px; vertical-align: middle; img { width: 20px; vertical-align: middle; margin-right: 5px; } &:hover:not(ul>li:first-child) { background-color: #e6e6e6; } } } // width: 100px;height: 100px; } // 交互板 #toast{ display: none; position: fixed; top: 0; left: 0; z-index: 100; width: 100vw; height: 100vh; background-color: rgba(29, 27, 27, 0.5) ; text-align: center; div{ background-color: #fff; position: absolute; padding: 5px; border-radius: 5px; width: 260px; // box-shadow: 0px 0px 5px #fff; left: calc(~"50vw - 130px"); top: 30vh; } }