DreamLife_ToolBox/css/sidebar.css

116 lines
2.4 KiB
CSS

/* 侧边栏 */
.sidebar {
position: fixed;
top: -30px;
width: 250px;
bottom: 24px;
background-color: #f4f4f4;
color: rgb(100, 99, 99); /* logo颜色 */
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
transition: transform 0.3s ease-in-out;
z-index: 2000;
}
.logo {
font-family: 'Pacifico', cursive; /* 使用本地字体 Pacifico */
padding-top: 48px;
text-align: center;
display: flex;
flex-direction: column; /* 将 part1 和 part2 垂直排列 */
align-items: center;
}
.logo .part1 {
font-size: 50px; /* "dream" 字体较大 */
}
.logo .part2 {
font-size: 40px; /* ".life" 字体较小 */
}
/* 侧边栏链接的基础样式 */
.sidebar-link {
position: relative;
font-size: 22px;
font-weight: bold;
margin-top: 48px;
color: rgb(117, 115, 115);
text-decoration: none; /* 去掉默认的下划线 */
display: inline-block;
padding: 10px 20px;
background-color: #f4f4f4;
transition: all 0.3s ease;
}
/* 侧边栏链接内容的容器 */
.sidebar-link .link-content {
display: flex;
background-color: #f4f4f4;
align-items: center;
transition: transform 0.3s ease;
}
/* 悬停时图标和文字一起上浮 */
.sidebar-link:hover .link-content {
transform: translateY(-3px); /* 向上浮起3px */
}
/* 图标样式 */
.sidebar-link .icon {
margin-right: 10px; /* 给图标和文字之间留点空隙 */
}
/* 悬停时改变链接的颜色 */
.sidebar-link:hover {
color: #000;
}
/* 退出全屏时的样式 */
.sidebar-link.fullscreen span {
content: "退出全屏";
}
.sidebar {
flex: 1 1 250px;
}
/* 侧边栏按钮容器 */
#sidebar {
display: flex;
flex-direction: column;
align-items: center;
padding-top: 30px;
}
/* 按钮样式:药丸形 */
.tag-btn {
display: block;
width: 100px;
height: 34px;
padding: 8px 10px;
border-radius: 20px;
color: #fff;
margin: 5px;
border: none;
cursor: pointer;
font-weight: bold;
text-align: center;
line-height: 17px;
transition: transform 0.5s ease, box-shadow 0.5s ease;
}
/* 按钮动画完成状态 */
.tag_btn.animated {
opacity: 1;
transform: translateY(0); /* 恢复到正常位置 */
}
/* 按钮悬停效果 */
.tag-btn:hover {
transform: scale(1.03);
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}