Appearance
Font 字体
大屏字体规范,统一中文、数值、英文的字体样式。
CSS样式
全部 font 样式代码:
查看代码
css
/* 大屏组件全局 CSS 变量 */
:root {
/* ==================== 主题色 ==================== */
--hn-color-primary: #439FFF; /* 品牌色 */
/* ==================== 辅助色 ==================== */
--hn-color-auxiliary-blue: #00EEFF; /* 海天蓝 */
--hn-color-auxiliary-cyan: #00FFB7; /* 炫丽青 */
--hn-color-auxiliary-purple: #AA00FF; /* 神秘紫 */
/* ==================== 文字颜色 ==================== */
--hn-color-text-white: #FFFFFF; /* 闪亮白 */
--hn-color-text-gray: #A3C0E5; /* 朦胧灰 */
/* ==================== 告警颜色 ==================== */
--hn-color-success: #00FF4D; /* 成功绿 */
--hn-color-link: #247BFF; /* 超链蓝 */
--hn-color-warning: #FFC300; /* 警告黄 */
--hn-color-danger: #FF1F47; /* 危险红 */
/* ==================== 渐变色 ==================== */
/* 品牌色渐变01 */
--hn-gradient-brand-start: #A1CFFF;
--hn-gradient-brand-end: #439FFF;
--hn-gradient-brand: linear-gradient(90deg, #A1CFFF 0%, #439FFF 100%);
/* 蓝色渐变02 */
--hn-gradient-blue-start: #7FB2FF;
--hn-gradient-blue-end: #0066FF;
--hn-gradient-blue: linear-gradient(90deg, #7FB2FF 0%, #0066FF 100%);
/* 红色渐变03 */
--hn-gradient-red-start: #E98197;
--hn-gradient-red-end: #E98197;
--hn-gradient-red: linear-gradient(90deg, #E98197 0%, #E98197 100%);
/* 蓝青色渐变04 */
--hn-gradient-cyan-start: #00D4FF;
--hn-gradient-cyan-end: #00FFB7;
--hn-gradient-cyan: linear-gradient(90deg, #00D4FF 0%, #00FFB7 100%);
/* 警告渐变05 */
--hn-gradient-warning-start: #FFE799;
--hn-gradient-warning-end: #FFC300;
--hn-gradient-warning: linear-gradient(90deg, #FFE799 0%, #FFC300 100%);
/* 绿色渐变06 */
--hn-gradient-green-start: #8CF7B7;
--hn-gradient-green-end: #00FF4D;
--hn-gradient-green: linear-gradient(90deg, #8CF7B7 0%, #00FF4D 100%);
/* 白色渐变07 */
--hn-gradient-white-start: #FFFFFF;
--hn-gradient-white-end: #A3C0E5;
--hn-gradient-white: linear-gradient(90deg, #FFFFFF 0%, #A3C0E5 100%);
/* 紫色渐变08 */
--hn-gradient-purple-start: #D47FFF;
--hn-gradient-purple-end: #AA00FF;
--hn-gradient-purple: linear-gradient(90deg, #D47FFF 0%, #AA00FF 100%);
/* ==================== 背景色 ==================== */
--hn-bg-center: #072652; /* 径向渐变中心 */
--hn-bg-edge: #00102A; /* 径向渐变边缘 */
--hn-bg-radial: radial-gradient(60% 60% at 50% 50%, #072652 0%, #00102A 100%), #D8D8D8;
--hn-bg-radial-center: linear-gradient(0deg, #072652, #072652), #D8D8D8;;
--hn-bg-radial-edge: linear-gradient(0deg, #00102A, #00102A), #D8D8D8;
/* ==================== 品牌梯度色 ==================== */
--hn-brand-level-1: #72B7FF;
--hn-brand-level-2: #439FFF;
--hn-brand-level-3: #1377FF;
--hn-brand-level-4: #133EF1;
--hn-brand-level-5: #000BDA;
/* ==================== 白色梯度色(文字) ==================== */
--hn-text-level-1: #FFFFFF;
--hn-text-level-2: #D8E4F4;
--hn-text-level-3: #A3C0E5;
--hn-text-level-4: #759DCF;
--hn-text-level-5: #426FA9;
/* ==================== 字体家族 ==================== */
--hn-font-family-title: 'DouYuZhuiGuangTi', sans-serif; /* 斗鱼追光体 - 头部标题 */
--hn-font-family-cn: 'Source Han Sans CN', 'Noto Sans SC', sans-serif; /* 思源黑体 - 中文 */
--hn-font-family-num: 'D-DIN', 'DIN Alternate', sans-serif; /* D-DIN - 数值/英文 */
/* ==================== 字号 ==================== */
--hn-font-size-h1: 28px; /* 头部标题栏 */
--hn-font-size-h2: 16px; /* 标题 */
--hn-font-size-h3: 14px; /* 小标题、按钮文字 */
--hn-font-size-body: 14px; /* 正文 */
--hn-font-size-caption: 12px; /* 辅助文字 */
--hn-font-size-num-lg: 32px; /* 大数值 */
--hn-font-size-num-md: 16px; /* 中数值 */
--hn-font-size-num-sm: 14px; /* 小数值 */
--hn-font-size-num-xs: 12px; /* 超小数值 */
/* ==================== 字重 ==================== */
--hn-font-weight-regular: 400;
--hn-font-weight-medium: 500;
--hn-font-weight-bold: 700;
}css
/* 字体规范展示容器 */
.font-showcase {
/* 透明背景,无边框 */
background: transparent !important;
}
/* 字体表格 */
.font-table {
width: 100%;
border-collapse: collapse;
background: transparent !important;
}
.font-table th,
.font-table td {
padding: 16px 24px;
text-align: left;
border: none !important;
background: transparent !important;
color: var(--hn-color-text-white);
}
.font-table tr {
background: transparent !important;
}
.font-table tr:hover {
background: transparent !important;
}
.font-table th {
font-family: var(--hn-font-family-cn);
font-size: 14px;
font-weight: 400;
color: rgba(255, 255, 255, 0.7);
padding-bottom: 24px;
}
.font-table td {
padding-top: 16px;
padding-bottom: 16px;
}
.font-table tr:last-child td {
border-bottom: none;
}
/* 字体预览单元格 */
.font-preview {
min-width: 200px;
}
/* 中文字体样式 */
.font-h1 {
font-family: var(--hn-font-family-title);
font-size: var(--hn-font-size-h1);
font-weight: var(--hn-font-weight-regular);
color: var(--hn-color-text-white);
}
.font-h2 {
font-family: var(--hn-font-family-cn);
font-size: var(--hn-font-size-h2);
font-weight: var(--hn-font-weight-bold);
color: var(--hn-color-text-white);
}
.font-h3 {
font-family: var(--hn-font-family-cn);
font-size: var(--hn-font-size-h3);
font-weight: var(--hn-font-weight-bold);
color: var(--hn-color-text-white);
}
.font-body {
font-family: var(--hn-font-family-cn);
font-size: var(--hn-font-size-body);
font-weight: var(--hn-font-weight-medium);
color: var(--hn-color-text-white);
}
.font-caption {
font-family: var(--hn-font-family-cn);
font-size: var(--hn-font-size-caption);
font-weight: var(--hn-font-weight-regular);
color: var(--hn-color-text-gray);
}
/* 数值/英文字体样式 */
.font-num-lg {
font-family: var(--hn-font-family-num);
font-size: var(--hn-font-size-num-lg);
font-weight: var(--hn-font-weight-bold);
color: var(--hn-color-text-white);
}
.font-num-md {
font-family: var(--hn-font-family-num);
font-size: var(--hn-font-size-num-md);
font-weight: var(--hn-font-weight-bold);
color: var(--hn-color-text-white);
}
.font-num-sm {
font-family: var(--hn-font-family-num);
font-size: var(--hn-font-size-num-sm);
font-weight: var(--hn-font-weight-bold);
color: var(--hn-color-text-white);
}
.font-num-xs {
font-family: var(--hn-font-family-num);
font-size: var(--hn-font-size-num-xs);
font-weight: var(--hn-font-weight-bold);
color: var(--hn-color-text-white);
}字号
中文内容使用思源黑体和斗鱼追光体。
字号
| Size | Font weight | Type | 适用范围 |
|---|---|---|---|
| 28px | Regular | 斗鱼追光体 | 头部标题栏 |
| 16px | Bold | 思源黑体 | 标题 |
| 14px | Bold | 思源黑体 | 小标题、按钮文字 |
| 14px | Medium | 思源黑体 | 正文 |
| 12px | Regular | 思源黑体 | 辅助文字 |
查看代码
vue
<div class="font-showcase">
<table class="font-table">
<thead>
<tr>
<th>Size</th>
<th>Font weight</th>
<th>Type</th>
<th>适用范围</th>
</tr>
</thead>
<tbody>
<tr v-for="spec in fontSpecs" :key="spec.size + spec.weight">
<td>{{ spec.size }}</td>
<td>{{ spec.weight }}</td>
<td>
<span :class="spec.class">{{ spec.sample }}</span>
</td>
<td>{{ spec.usage }}</td>
</tr>
</tbody>
</table>
</div>数值英文字号
数值和英文使用 D-DIN 等宽字体,便于数据对齐和阅读。
数值英文字号
| Size | Font weight | Type | 适用范围 |
|---|---|---|---|
| 32px | Bold | 1,234,567 | 数值 |
| 16/14/12px | Bold | 123.45% | 数值、英文 |
查看代码
vue
<div class="font-showcase">
<table class="font-table">
<thead>
<tr>
<th>Size</th>
<th>Font weight</th>
<th>Type</th>
<th>适用范围</th>
</tr>
</thead>
<tbody>
<tr v-for="spec in fontSpecs" :key="spec.size">
<td>{{ spec.size }}</td>
<td>{{ spec.weight }}</td>
<td>
<span :class="spec.class">{{ spec.sample }}</span>
</td>
<td>{{ spec.usage }}</td>
</tr>
</tbody>
</table>
</div>