美化移动设备下界面的样式,并优化操作逻辑
This commit is contained in:
1 parent
a734192bfd
commit
4f607e63fb
8 files changed
+82
-43
No files matched your search
@@ -77,3 +77,11 @@ header .toggle-menu:hover {
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
|
||||
}
|
||||
|
||||
#logo_head {
|
||||
font-family: 'Pacifico', cursive; /* 使用本地字体 Pacifico */
|
||||
margin: 0;
|
||||
padding-left: 10px;
|
||||
text-align: left;
|
||||
font-size: 32px;
|
||||
color: rgb(117, 115, 115);
|
||||
}
|
||||
+14
-2
@@ -9,10 +9,12 @@
|
||||
}
|
||||
|
||||
#search-input {
|
||||
position: absolute;
|
||||
width: 50%; /* 设置宽度为屏幕的50% */
|
||||
padding: 5px 15px;
|
||||
top: 10px;
|
||||
top: 72px;
|
||||
left: 50%; /* 使搜索框居中 */
|
||||
z-index: 1000; /* 确保在顶部 */
|
||||
}
|
||||
|
||||
#search-input:hover,
|
||||
@@ -27,6 +29,7 @@
|
||||
width: 80%; /* 设置侧边栏宽度为60% */
|
||||
bottom: 0;
|
||||
transform: translateX(-100%); /* 默认隐藏侧边栏 */
|
||||
z-index: 2000; /* 确保在顶部 */
|
||||
}
|
||||
|
||||
.sidebar.open {
|
||||
@@ -35,11 +38,15 @@
|
||||
width: 80%; /* 确保侧边栏在打开时宽度为60% */
|
||||
}
|
||||
|
||||
.logo {
|
||||
padding-top: 72px !important;
|
||||
}
|
||||
|
||||
/* 小屏幕时主内容区 */
|
||||
.main-content {
|
||||
margin-left: 0px; /* 小屏幕时移除左边距 */
|
||||
margin-right: 0px; /* 小屏幕时右边距减小 */
|
||||
margin-top: 60px; /* 小屏幕时稍微减小上边距 */
|
||||
margin-top: 80px; /* 小屏幕时稍微减小上边距 */
|
||||
}
|
||||
|
||||
/* 小屏幕时头部 */
|
||||
@@ -47,6 +54,7 @@
|
||||
height: 40px; /* 设置头部高度为50px */
|
||||
justify-content: space-between; /* 保持头部内容在两端 */
|
||||
align-items: center; /* 垂直居中内容 */
|
||||
z-index: 3000; /* 确保在顶部 */
|
||||
}
|
||||
/* 小屏幕时菜单按钮 */
|
||||
header .toggle-menu {
|
||||
@@ -66,4 +74,8 @@
|
||||
header .toggle-menu:hover {
|
||||
background-color: rgba(235, 10, 10, 0.1); /* 增加轻微的背景色变化 */
|
||||
}
|
||||
|
||||
#logo_head {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,10 @@
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
#logo_head {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fullscreen-button {
|
||||
display: flex; /* 小屏幕隐藏头部全屏按钮 */
|
||||
}
|
||||
|
||||
+31
-4
@@ -15,8 +15,6 @@
|
||||
z-index: 2000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.logo {
|
||||
font-family: 'Pacifico', cursive; /* 使用本地字体 Pacifico */
|
||||
margin: 0;
|
||||
@@ -28,7 +26,7 @@
|
||||
}
|
||||
|
||||
.logo .part1 {
|
||||
font-size: 50px; /* "ream" 字体较大 */
|
||||
font-size: 50px; /* "dream" 字体较大 */
|
||||
}
|
||||
|
||||
.logo .part2 {
|
||||
@@ -92,4 +90,33 @@
|
||||
flex-direction: column; /* 垂直排列按钮 */
|
||||
align-items: center; /* 确保按钮水平居中 */
|
||||
padding-top: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 按钮样式:药丸形 */
|
||||
.tag-btn {
|
||||
display: block; /* 让按钮变成 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);
|
||||
}
|
||||
@@ -104,31 +104,3 @@
|
||||
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/* 按钮样式:药丸形 */
|
||||
.tag-btn {
|
||||
display: block; /* 让按钮变成 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);
|
||||
}
|
||||
Reference in new issue
Block a user