修改框架tab页标签样式
This commit is contained in:
parent
c2bf4656eb
commit
5cd1b0d887
@ -243,35 +243,63 @@ function handleScroll() {
|
|||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang='scss' scoped>
|
||||||
.tags-view-container {
|
.tags-view-container {
|
||||||
height: 34px;
|
height: 34px; /* 稍微增加高度,让立体效果更明显 */
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #fff;
|
background: #f5f7fa; /* 标签栏整体背景(浅灰,与标签区分) */
|
||||||
border-bottom: 1px solid #d8dce5;
|
/* 1. 去掉底部边框(关键:消除物理边框导致的缝隙) */
|
||||||
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);
|
border-bottom: none;
|
||||||
|
/* 2. 弱化或去掉标签栏的底部阴影(避免阴影造成视觉缝隙) */
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02); /* 仅保留极浅的顶部阴影 */
|
||||||
|
/* 标签栏底部加一条浅线,区分标签栏和下方页面 */
|
||||||
|
border-bottom: 1px solid #e0e0e0;
|
||||||
.tags-view-wrapper {
|
.tags-view-wrapper {
|
||||||
.tags-view-item {
|
.tags-view-item {
|
||||||
display: inline-block;
|
/* 未激活标签:灰色渐变+立体阴影 */
|
||||||
position: relative;
|
display: inline-block;
|
||||||
cursor: pointer;
|
position: relative;
|
||||||
height: 26px;
|
cursor: pointer;
|
||||||
line-height: 26px;
|
height: 28px;
|
||||||
border: 1px solid #d8dce5;
|
line-height: 28px;
|
||||||
color: #495060;
|
padding: 0 12px;
|
||||||
background: #fff;
|
font-size: 12px;
|
||||||
padding: 0 8px;
|
margin-left: 4px;
|
||||||
font-size: 12px;
|
margin-top: 4px;
|
||||||
margin-left: 5px;
|
border-radius: 4px 4px 0 0; /* 底部圆角去掉,与下方无缝感 */
|
||||||
margin-top: 4px;
|
border: 1px solid #d0d0d0; /* 浅灰边框 */
|
||||||
&:first-of-type {
|
border-bottom-color: transparent; /* 底部边框透明,避免与标签栏线重叠 */
|
||||||
margin-left: 15px;
|
|
||||||
}
|
/* 灰色渐变:从上到下浅灰→深灰(模拟轻微凸起) */
|
||||||
&:last-of-type {
|
background: linear-gradient(180deg, #f0f0f0 0%, #e0e0e0 100%);
|
||||||
margin-right: 15px;
|
|
||||||
}
|
/* 立体阴影:底部轻微阴影+顶部内高光 */
|
||||||
|
box-shadow:
|
||||||
|
0 2px 4px rgba(0, 0, 0, 0.1), /* 底部阴影加深,突出悬浮感 */
|
||||||
|
inset 0 1px 1px rgba(255, 255, 255, 0.8); /* 顶部内高光,增强凸起感 */
|
||||||
|
|
||||||
|
|
||||||
|
color: #777; /* 文字灰色,不抢眼 */
|
||||||
|
transition: all 0.2s ease; /* 过渡动画 */
|
||||||
|
|
||||||
|
/* 鼠标悬停时增强效果(未激活状态) */
|
||||||
|
&:hover:not(.active) {
|
||||||
|
background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
|
||||||
|
box-shadow:
|
||||||
|
0 3px 4px rgba(0, 0, 0, 0.08),
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.9);
|
||||||
|
border-color: #d0d0d0;
|
||||||
|
color: #333; /* hover时文字略深 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 激活标签样式:深色渐变+强阴影,突出当前页 */
|
||||||
&.active {
|
&.active {
|
||||||
background-color: #42b983;
|
/* 激活标签:从左到右的主题色渐变(示例用蓝紫色) */
|
||||||
color: #fff;
|
background: linear-gradient(90deg, #409eff 0%, #6b7aff 100%);
|
||||||
border-color: #42b983;
|
color: #ffffff; /* 文字白色,与渐变背景对比 */
|
||||||
|
border-color: #409eff; /* 边框与渐变颜色匹配 */
|
||||||
|
box-shadow: 0 3px 6px rgba(64, 158, 255, 0.25), /* 外阴影(带颜色倾向,增强立体感) */
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.2); /* 内阴影(顶部亮边,模拟高光) */
|
||||||
|
transform: translateY(-1px); /* 轻微上浮,与其他标签区分 */
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: "";
|
content: "";
|
||||||
background: #fff;
|
background: #fff;
|
||||||
@ -281,28 +309,34 @@ function handleScroll() {
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* 小圆圈阴影,增强立体 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 右键菜单也增加立体效果 */
|
||||||
.contextmenu {
|
.contextmenu {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background: #fff;
|
background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
|
||||||
z-index: 3000;
|
z-index: 3000;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
border-radius: 4px;
|
border-radius: 6px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #333;
|
color: #333;
|
||||||
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
|
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), /* 外阴影 */
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.8); /* 内阴影 */
|
||||||
|
border: 1px solid #e5e7eb;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 7px 16px;
|
padding: 7px 16px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
&:hover {
|
&:hover {
|
||||||
background: #eee;
|
background: #f0f5ff; /* hover 时浅蓝色背景,与整体风格呼应 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user