.index-wrapper { display: flex; flex-direction: column; height: 100vh; padding-top: 15px; } .homepage { flex: 1; position: relative; background: rgb(251, 251, 251); border-radius: 5px; overflow: hidden; transition: .1s linear; .search { z-index: 66666; position: fixed; top: 250px; left: 50%; width: 600px; padding: 10px; border-radius: 10px; transform: translate(-50%, 0); background: #e5e5ea; font-size: 26px; border: 1px solid #ccc; box-shadow: 0 4px 8px 1px #ccc; } .top-nav { padding: 10px; overflow: none; white-space: nowrap; border-bottom: 1px solid #eee; text-align: center; a { display: inline-block; padding: 10px 15px; color: #000; cursor: pointer; border-radius: 5px; overflow: hidden; &:hover { text-decoration: none; } } } } .index-section { position: relative; height: calc(100% - 52px); overflow: hidden; .icon-box { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; .icon { width: 20px; } } // 侧边栏分类 $sidebarWidth: 80px; .sidebar { position: relative; width: $sidebarWidth; height: 100%; text-align: center; border-right: 1px solid #eee; .tag { position: relative; cursor: pointer; &.active { color: #1890ff; a:after { top: 0; border-top: 1px dashed #ccc; } a:before { bottom: 0; border-bottom: 1px dashed #ccc; } } a { display: block; padding: 11px 0; &:after, &:before { content: ""; position: absolute; left: 0; width: 100%; } } } } .main { position: absolute; top: 0; left: $sidebarWidth; right: 0; bottom: 30px; padding-bottom: 50px; overflow-y: auto; .icon { display: inline-block; width: 35px; height: 35px; vertical-align: middle; border-radius: 50%; pointer-events: none; border: 1px solid #eee; background-color: #fff; } .name { display: inline-block; font-size: 16px; margin-left: 5px; width: calc(100% - 50px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; } .desc { padding: 5px 10px 5px 10px; border-top: 1px solid #eee; margin-top: 8px; word-break: break-all; word-wrap: break-word; font-size: 12px; } .mark { z-index: 28; position: absolute; bottom: -50px; left: 0; width: 100%; padding: 10px 0 5px 0px; background: #fbfbfb; cursor: auto; display: flex; justify-content: center; align-content: center; transition: .1s linear; .button-box { width: 100%; text-align: center; } a { display: inline-block; position: relative; width: 50px; font-size: 12px; padding: 3px 0; border: none; background: #2db7f5; color: #fff; border-radius: 3px; overflow: hidden; &:not(:nth-last-child(1)) { margin-right: 10px; } &:after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #000; opacity: 0; } &:active:after { opacity: .2; } } .zh { background: #26a2ff; } } .title-wrapper { border-bottom: 1px solid #ccc; padding: 10px 0 10px 15px; &:hover { .edit { display: inline-block; } } } .block-title { display: inline-block; position: relative; color: #3F51B5; .edit { display: none; position: absolute; top: -2px; right: -25px; width: 15px; height: 15px; margin-left: 5px; margin-top: 5px; background: url("https://xiejiahe.gitee.io/nav/assets/img/edit.svg"); background-size: 15px; } } .top { padding: 10px; } } .row { display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; a { color: #333; &:hover { text-decoration: none; } } .click-btn { z-index: 1111; position: relative; width: 200px; margin: 12px; border: 1px solid #eee; overflow: hidden; &:hover { .mark { bottom: 0; } } } } }