@title-top: #3181ff; @title-bg: #e0ecff; @body-bg: #03C762; // 通用样式 // 省 .my-province { position: relative; span { line-height: normal; color: #f03; font-size: 14px; margin-right: 5px; } i { margin-left: 5px; font-size: 12px; color: #e6e6e6; } div { display: none; width: 286px; position: absolute; top: 30px; z-index: 100; background-color: #fff; border: 1px solid #e6e6e6; padding: 10px; .icon-play { transform: rotate(-90deg); position: absolute; top: -10px; } ul { width: 100%; padding: 0; list-style: none; display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; margin: 0; &>li:last-child { color: #f03; } li { padding: 5px; width: 60px; margin: 3px; box-sizing: border-box; &:hover { background-color: #f6f6f6; border: 5px; } } } } } // 搜索 .my-search{ margin: 32px 30px 0 0; div{ display: flex; align-items: center; border: 1px solid #aaa; border-radius: 5px; padding: 0 0 0 5px; overflow: hidden; max-width: 300px; select{ border: 0; outline: none; border-right: 1px solid #e6e6e6 !important; height: 34px; box-sizing: border-box; border-right: 0; } input{ border: 0; outline: none; padding: 5px; height: 34px; box-sizing: border-box; border-left: 0; width: 100%; } label{ display: block; margin: 0; height: 34px; box-sizing: border-box; color: #0099CC !important; line-height: 34px; padding: 0 10px; color: #fff; } } } // 标签默认样式 textarea { resize: none; } // 移动端下拉菜单动画 @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; cursor: pointer; } } &::-webkit-scrollbar { /*滚动条整体样式*/ width: 5px; /*高宽分别对应横竖滚动条的尺寸*/ 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 { // 通用样式 .my-province { margin-left: 5px; margin-top: 20px; @media screen and (max-width:768px) { & { display: none; } } } width: 100%; background-color: #fff; border-bottom: 1px solid #f1f1f1; background-color: #fff; position: fixed; z-index: 1000; .ha-item { margin-top: 10px; height: 70px; .img { height: 100%; span { font-size: 30px; font-weight: bold; color: @body-bg; display: block; line-height: 70px; } img { height: 100%; } } .button { display: none; @media screen and (max-width:768px) { & { display: block; } } .button { color: @body-bg; padding: 10px; border: 2px solid @body-bg; margin-top: 13px; text-align: center; font-size: 20px; border-radius: 5px; } } .my-search{ @media screen and (max-width:768px){ display: none; } } .app { height: 100%; text-align: center; position: relative; @media screen and (max-width:768px) { & { display: none; } } a { text-decoration: none; color: @body-bg; img { width: 50px; } } div { position: absolute; right: 0px; } } } .hb-item { // 大屏下拉菜单 box-sizing: border-box; .nav { // transform: translateY(-30px); box-sizing: border-box; width: 100%; display: flex; justify-content: flex-start; align-content: center; @media screen and (max-width:768px) { & { 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; font-size: 12px; color: #e6e6e6; } &: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; box-sizing: border-box; background-color: #fff; margin-top: 80px; padding: 0 0 0 22px; // 通用样式 .my-province { padding: 20px 0; div { top: 50px; } } .search{ padding: 20px 0; border-bottom: 1px solid #e6e6e6; .my-search{ margin: 0; } } @media screen and (max-width:768px) { & { border-top: 1px solid #eee; } } &::-webkit-scrollbar { height: 0; } &>ul>li>a.active { color: @body-bg; } ul { padding-inline-start: 0; 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 0.5s; -webkit-animation: nav 0.5s normal; -moz-animation: nav 0.5s; } .nav-sm-noshow { height: 0px; animation: navc 0.5s; -webkit-animation: navc 0.5s normal; -moz-animation: navc 0.5s; } // 主题默认样式 .body { background-color: #fff; max-width: 1200px; min-height: 700px; overflow: hidden; position: relative; padding: 10px 15px 15px; margin: 141px 20px 20px; // 自定义样式类 // 加载 .my-loading { text-align: center; color: #999; display: none; } // 点击阅读 .my-read { margin-top: 20px; text-align: center; .good { border-radius: 5px; border: 1px solid #e6e6e6; display: inline-block; padding: 5px 30px; margin-bottom: 10px; } } .my-search{ margin: 10px 0; } // 相关文章 .my-articles { ul { width: 100%; border-top: 1px solid #e6e6e6; padding: 0; list-style: none; overflow: hidden; // margin: ; li { &::before { content: ""; display: inline-block; width: 6px; height: 6px; background-color: #000; transform: translateY(-2px); margin-right: 5px; border-radius: 50%; } color: #777; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; padding: 5px 0px; } } } // 评论区 .my-comment { .h5 { display: flex; justify-content: space-between; align-content: center; } .remind { text-align: center; background-color: #e6e6e6; padding: 5px; border-radius: 5px; margin: 10px 0px; } .comment { border-top: 1px solid #e6e6e6; padding-top: 10px; .nocomment, .loading, .nodata { display: none; text-align: center; margin: 10px; } .nocomment { display: block; padding-bottom: 10px; &:hover { color: @body-bg; } } .user { width: 100%; padding: 20px 0; border-bottom: 1px solid #e6e6e6; display: grid; grid-template-columns: 10% 90%; .u-img { width: 100%; text-align: center; .img { width: 100%; max-width: 64px; } } .u-content { margin-left: 10px; text-align: justify; .u-name { font-size: 16px; } .u-detail { padding: 5px 0px; } .u-flex { display: flex; justify-content: space-between; align-items: center; } } } } } // 横向菜单 .my-nav { border-bottom: 1px solid #e6e6e6; &::after { display: block; content: ''; clear: both; } ul { list-style: none; padding: 0; li { float: left; padding: 5px; margin: 0px 5px; color: #777; } .active { color: black; border-bottom: 3px solid @body-bg; font-weight: bold; } } } // 上拉刷新 列表 .my-list { .list-item { text-decoration: none; color: black; display: flex; justify-content: flex-start; align-items: start; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid #e6e6e6; &:hover { color: @body-bg; } .item-img { flex: 1; padding: 0 20px; @media screen and (max-width: 768px) { & { padding: 0 10px; } } img { width: 100%; border-radius: 5px; &:hover { transform: scale(1.1); } } } .item-detail { flex: 4; height: 100%; position: relative; overflow: hidden; @media screen and (max-width: 768px) { & { flex: 2; } } .title { font-weight: 400; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 16px; } .time { font-size: 12px; color: #777; margin-top: 5px; span { margin-left: 5px; } } } } } @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: 80px; right: 20px; padding: 20px; z-index: 1000; 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:first-child { 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; background-color: #fff; &>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; } } } #qrcode { &::before { display: block; content: "微信扫一扫:分享"; line-height: 30px; font-size: 12px; text-align: center; background-color: #e6e6e6; } img { margin: auto; padding: 20px 0; } width: 180px; box-sizing: border-box; box-shadow: 0px 0px 5px #999; display: none; position: absolute; background-color: #fff; top: -210px; border-radius: 5px; right: 140px; .wei { text-align: center; } } } // 交互板 #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: 200px; // box-shadow: 0px 0px 5px #fff; left: calc(~"50vw - 100px"); top: 30vh; } } // 下载app #download { position: fixed; bottom: 0px; width: 100vw; display: none; justify-content: space-between; align-items: center; background-color: rgba(1, 1, 1, 0.5); padding: 5px 10px; color: #fff; z-index: 1000; .left { width: 200px; &::before { display: block; content: ''; clear: both; } img, div { float: left; } img { width: 50px; } div { margin-left: 10px; } .row1 { margin-bottom: 10px; } } @media screen and (max-width:768px) { display: flex; } } // 通用图片轮播观看 #imglist { &::-webkit-scrollbar { /*滚动条整体样式*/ width: 5px; /*高宽分别对应横竖滚动条的尺寸*/ height: 5px; } &::-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; } display: none; overflow: scroll; position: fixed; width: 100vw; box-sizing: border-box; height: 100vh; top: 0; z-index: 1000; background-color: #fff; p{ position: fixed; bottom: 5px; width: 100%; text-align: center; } span{ display: block; position: fixed; right: 20px; top: 10px; width: 35px; height:115px; background-color: #000; padding: 5px; border-radius: 5px; img{ width: 25px; position:relative !important; margin: 5px 0; } } div { line-height: 100%; position: relative; width: 100%; height: 100%; // background-color: rgba(0, 0, 0, 0.6); img { position: absolute; } .glyphicon { &:hover { background-color: rgba(247, 237, 237, 0.5); } position:fixed; color: #000; width: 20%; max-width: 50px; height: 100px; border-radius: 5px; text-align: center; line-height: 100px; margin-top: calc(~"50vh - 50px"); } .left { left: 50px; @media screen and (max-width:768px) { left: 10px; } } .right { right:50px; @media screen and (max-width:768px) { right: 10px; } } } }