模板:角色/styles.css
来自国漫宇宙
更多操作
< 模板:角色
/* ===================================================
* 国漫TV · 角色词条专属组件样式 (TemplateStyles 作用域)
* =================================================== */
/* --- 1. 结构化角色 Infobox 重构 --- */
.gmtv-char-infobox {
float: right;
width: 320px;
margin: 0 0 24px 30px;
background-color: #ffffff;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(126, 34, 206, 0.08);
border: 1px solid #f3e8ff;
overflow: hidden;
font-size: 0.95em;
box-sizing: border-box;
}
/* 移动端优先:屏幕宽度不足时自动转换为全宽占位,不再浮动 */
@media screen and (max-width: 768px) {
.gmtv-char-infobox {
float: none;
width: 100%;
margin: 0 0 24px 0;
}
}
/* 顶栏:角色名与一句话身份定位 */
.gmtv-char-infobox-header {
background: linear-gradient(135deg, #7e22ce 0%, #a855f7 100%);
color: #ffffff;
padding: 20px;
text-align: center;
}
.gmtv-char-infobox-title {
font-size: 1.5em;
font-weight: 800;
margin-bottom: 4px;
letter-spacing: 1px;
}
.gmtv-char-infobox-quote {
font-size: 0.85em;
opacity: 0.85;
font-style: italic;
}
/* Infobox 数据行布局 */
.gmtv-char-infobox-section {
padding: 12px 20px;
background-color: #faf5ff;
color: #7e22ce;
font-weight: bold;
font-size: 1.05em;
border-top: 1px solid #f3e8ff;
border-bottom: 1px solid #f3e8ff;
}
.gmtv-char-infobox-row {
display: flex;
padding: 10px 20px;
border-bottom: 1px dashed #f0f0f0;
}
.gmtv-char-infobox-row:last-child {
border-bottom: none;
}
.gmtv-char-infobox-label {
flex: 0 0 85px;
color: #666666;
font-weight: 500;
}
.gmtv-char-infobox-data {
flex: 1;
color: #2c3e50;
}
/* 词条内专属链接交互(双圆弧线动态特效) */
.gmtv-char-infobox-data a,
.relation-name a,
.gmtv-data-table a {
position: relative;
transition: color 0.3s ease;
overflow: visible;
text-decoration: none;
color: #7e22ce;
font-weight: 500;
}
.gmtv-char-infobox-data a::before, .gmtv-char-infobox-data a::after,
.relation-name a::before, .relation-name a::after,
.gmtv-data-table a::before, .gmtv-data-table a::after {
content: "";
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 14px;
height: 80%;
border: 2px solid transparent;
border-radius: 50%;
opacity: 0;
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
pointer-events: none;
}
.gmtv-char-infobox-data a::before, .relation-name a::before, .gmtv-data-table a::before {
left: 0; border-left-color: #7e22ce;
}
.gmtv-char-infobox-data a::after, .relation-name a::after, .gmtv-data-table a::after {
right: 0; border-right-color: #7e22ce;
}
.gmtv-char-infobox-data a:hover::before, .relation-name a:hover::before, .gmtv-data-table a:hover::before {
left: -6px; opacity: 1;
}
.gmtv-char-infobox-data a:hover::after, .relation-name a:hover::after, .gmtv-data-table a:hover::after {
right: -6px; opacity: 1;
}
/* --- 2. 可视化境界进度条 (Pure CSS) --- */
.gmtv-realm-container {
margin: 20px 0;
padding: 16px;
background-color: #faf5ff;
border-radius: 8px;
border: 1px solid #f3e8ff;
}
.gmtv-realm-header {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
font-size: 0.9em;
font-weight: bold;
color: #4527a0;
}
.gmtv-progress-track {
width: 100%;
height: 12px;
background-color: #e5e5e5;
border-radius: 6px;
overflow: hidden;
box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.gmtv-progress-fill {
height: 100%;
background: linear-gradient(90deg, #7e22ce, #d946ef);
border-radius: 6px;
transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
/* 配合 style="width: XX%" 实现动态填满效果 */
}
/* --- 3. 战绩与技能数据表格重构 --- */
.gmtv-data-table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
background-color: #ffffff;
box-shadow: 0 2px 12px rgba(126, 34, 206, 0.05);
border-radius: 8px;
overflow: hidden; /* 配合圆角生效 */
}
.gmtv-data-table th {
background-color: #f3e8ff;
color: #7e22ce;
padding: 14px 16px;
text-align: left;
font-weight: bold;
border-bottom: 2px solid #e9d5ff;
}
.gmtv-data-table td {
padding: 12px 16px;
border-bottom: 1px solid #f0f0f0;
color: #2c3e50;
font-size: 0.95em;
vertical-align: middle;
}
.gmtv-data-table tr:last-child td {
border-bottom: none;
}
.gmtv-data-table tbody tr {
transition: background-color 0.2s ease;
}
.gmtv-data-table tbody tr:hover {
background-color: #faf5ff; /* 悬浮整行高亮指示 */
}
/* 战果特殊标记 */
.gmtv-result-win {
color: #16a34a;
font-weight: bold;
background: #dcfce7;
padding: 2px 8px;
border-radius: 4px;
}
.gmtv-result-loss {
color: #dc2626;
font-weight: bold;
background: #fee2e2;
padding: 2px 8px;
border-radius: 4px;
}
.gmtv-result-draw {
color: #d97706;
font-weight: bold;
background: #fef3c7;
padding: 2px 8px;
border-radius: 4px;
}
/* --- 4. 人物关系网络图谱 (CSS Grid 卡片流) --- */
.gmtv-relation-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 16px;
margin: 20px 0;
}
.gmtv-relation-card {
background-color: #ffffff;
border: 1px solid #f3e8ff;
border-radius: 8px;
padding: 16px 12px;
text-align: center;
box-shadow: 0 2px 8px rgba(0,0,0,0.02);
transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.gmtv-relation-card:hover {
transform: translateY(-4px);
border-color: #a855f7;
box-shadow: 0 8px 16px rgba(126, 34, 206, 0.08);
}
.relation-label {
font-size: 0.8em;
color: #888888;
margin-bottom: 6px;
text-transform: uppercase;
letter-spacing: 1px;
}
.relation-name {
font-size: 1.1em;
font-weight: bold;
}