mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-03 07:32:51 +08:00
228 lines
3.5 KiB
CSS
228 lines
3.5 KiB
CSS
/* 字体引入 */
|
|
/* @font-face {
|
|
font-family: HarmonyOS_Sans;
|
|
src: url("../fonts/HarmonyOS_Sans_SC_Regular.ttf") format("truetype");
|
|
font-weight: normal;
|
|
font-style: normal;
|
|
} */
|
|
|
|
/* 全局样式 */
|
|
html,
|
|
body {
|
|
margin: 0;
|
|
font-family: bookshelfplusFont;
|
|
}
|
|
|
|
a,
|
|
a:visited {
|
|
text-decoration: none;
|
|
color: #0056ff;
|
|
}
|
|
|
|
hr {
|
|
border-top: solid 1px #9f9f9f;
|
|
border-bottom: 0;
|
|
}
|
|
|
|
/* 导航栏样式 */
|
|
.navbar {
|
|
background-color: #2b2b2b;
|
|
color: #fff;
|
|
height: 60px;
|
|
line-height: 60px;
|
|
|
|
user-select: none;
|
|
}
|
|
|
|
.navbar-grid {
|
|
height: 100%;
|
|
display: grid;
|
|
grid-template-columns: 10vw 1fr 280px 10vw;
|
|
gap: 10px;
|
|
}
|
|
|
|
.navbar-grid .grid-item {
|
|
/* 下面三行为辅助样式 */
|
|
/* border: white solid 1px;
|
|
border-top: 0;
|
|
border-bottom: 0; */
|
|
}
|
|
|
|
.navbar-grid .grid-item a,
|
|
.navbar-grid .grid-item a:visited {
|
|
color: #fff;
|
|
margin-left: 12px;
|
|
}
|
|
.navbar-grid .grid-item .active {
|
|
border-bottom: dotted;
|
|
}
|
|
|
|
.navbar-grid .grid-item * {
|
|
margin: 0;
|
|
}
|
|
|
|
.navbar > ul {
|
|
list-style-type: none;
|
|
display: flex;
|
|
}
|
|
|
|
.navbar > ul > li > a {
|
|
color: #fff;
|
|
}
|
|
|
|
/* 标题 siteTitle */
|
|
.siteTitle h1 {
|
|
margin-top: 130px;
|
|
font-size: 36px;
|
|
transition: 0.3s;
|
|
cursor: default;
|
|
display: inline-block;
|
|
user-select: none;
|
|
}
|
|
.siteTitle h1:hover {
|
|
transform: scale(1.2);
|
|
}
|
|
|
|
.siteTitle span {
|
|
display: inline-block;
|
|
color: crimson;
|
|
}
|
|
|
|
/* 正文样式 */
|
|
.main {
|
|
margin: 0 auto;
|
|
text-align: center;
|
|
/* max-width: 600px; */
|
|
max-width: min(90vw, 720px);
|
|
min-height: 50vh;
|
|
}
|
|
|
|
.main > h1 {
|
|
margin-block-start: 40px;
|
|
}
|
|
|
|
.main p {
|
|
font-size: 17.5px;
|
|
line-height: 2em;
|
|
}
|
|
|
|
/* 搜索框 */
|
|
.searchBox #searchInput {
|
|
/* padding: 0 10px; */
|
|
width: 300px;
|
|
width: min(70vw, 280px);
|
|
height: 30px;
|
|
margin-top: 30px;
|
|
margin-bottom: 5px;
|
|
|
|
transition: 0.3s;
|
|
|
|
border: none;
|
|
border-bottom: 1px solid #ccc;
|
|
/* padding: 0.5em; */
|
|
font-size: 1em;
|
|
outline: none;
|
|
|
|
padding-bottom: 0.2em;
|
|
/* text-align: center; */
|
|
}
|
|
|
|
.searchBox #searchInput:focus {
|
|
padding: 0 18px;
|
|
height: 35px;
|
|
width: min(78vw, 300px);
|
|
|
|
border: 1px solid rgb(133, 133, 133);
|
|
border-radius: 3px;
|
|
|
|
/* text-align: left; */
|
|
}
|
|
|
|
.searchBox #searchButton {
|
|
width: 80px;
|
|
height: 40px;
|
|
|
|
background-color: #fff;
|
|
border: 1px solid #ccc;
|
|
border-radius: 4px;
|
|
color: #000;
|
|
cursor: pointer;
|
|
display: inline-block;
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
height: 32px;
|
|
line-height: 32px;
|
|
margin: 0;
|
|
padding: 0 16px;
|
|
text-align: center;
|
|
text-decoration: none;
|
|
vertical-align: middle;
|
|
white-space: nowrap;
|
|
/* width: auto; */
|
|
|
|
margin-left: 10px;
|
|
transition: 0.25s;
|
|
|
|
margin-bottom: 3px;
|
|
}
|
|
|
|
.searchBox #searchButton:hover {
|
|
background-color: rgb(39, 39, 39);
|
|
color: #fff;
|
|
}
|
|
|
|
/* 网站Slogan */
|
|
.sloganBox .emphasize {
|
|
font-weight: bold;
|
|
text-decoration: underline;
|
|
padding-top: 10px;
|
|
padding-bottom: 20px;
|
|
}
|
|
|
|
/* 页脚 */
|
|
.footer {
|
|
text-align: center;
|
|
margin-top: 40px;
|
|
color: #3f3f3f;
|
|
}
|
|
|
|
/* 自适应 */
|
|
@media (max-width: 600px) {
|
|
.narrowHide {
|
|
display: none;
|
|
}
|
|
|
|
.navbar-grid {
|
|
grid-template-columns: 10vw 1fr 110px 10vw;
|
|
}
|
|
|
|
/* 正文样式 */
|
|
.main {
|
|
max-width: 90vw;
|
|
}
|
|
|
|
.main p {
|
|
font-size: initial;
|
|
/* line-height: initial; */
|
|
}
|
|
}
|
|
|
|
@media (max-width: 300px) {
|
|
.exnarrowHide {
|
|
display: none;
|
|
}
|
|
|
|
.navbar-grid {
|
|
grid-template-columns: 10vw 1fr 0 10vw;
|
|
}
|
|
}
|
|
|
|
/* 全局样式 */
|
|
/* 超出内容显示为... */
|
|
.overflow-omit {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
display: block;
|
|
}
|