模板:标识符/styles.css:修订间差异
来自ANACHRONISM
更多操作
< 模板:标识符
创建页面,内容为“→============================================ 标识符通用样式 ============================================: .identifier { display: flex; justify-content: space-between; align-items: center; box-sizing: border-box; width: 100%; padding: 8px 12px; gap: 12px; font-size: 1rem; line-height: 1.4; border-radius: 4px; margin: 6px 0; } .identifier__left { font-weight: 800; flex: 0 1 auto; min-widt…” |
无编辑摘要 |
||
| 第8行: | 第8行: | ||
align-items: center; | align-items: center; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
position: relative; /* 供四角绝对定位 */ | |||
width: 100%; | width: 100%; | ||
padding: | padding: 14px 24px; /* 内边距加大,给角字符留空间 */ | ||
gap: 12px; | gap: 12px; | ||
font-size: 1rem; | font-size: 1rem; | ||
| 第17行: | 第18行: | ||
} | } | ||
/* ===== 四角符号 ===== */ | |||
.identifier__corner { | |||
position: absolute; | |||
font-size: 1.5em; | |||
line-height: 1; | |||
font-weight: 300; | |||
color: currentColor; | |||
opacity: 0.55; | |||
/* 等宽字体让四个角形状更规整 */ | |||
font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace; | |||
/* 稍微拉长纵向,视觉上更"框住" */ | |||
transform: scaleY(1.25); | |||
transform-origin: center; | |||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25); | |||
} | |||
.identifier__corner--tl { | |||
top: 3px; | |||
left: 6px; | |||
} | |||
.identifier__corner--tr { | |||
top: 3px; | |||
right: 6px; | |||
} | |||
.identifier__corner--bl { | |||
bottom: 3px; | |||
left: 6px; | |||
} | |||
.identifier__corner--br { | |||
bottom: 3px; | |||
right: 6px; | |||
} | |||
/* ===== 左侧:标识符名称 ===== */ | |||
.identifier__left { | .identifier__left { | ||
font-weight: 800; | font-weight: 800; | ||
| 第32行: | 第67行: | ||
} | } | ||
/* ===== 右侧:描述 + 作者 ===== */ | |||
.identifier__right { | .identifier__right { | ||
font-size: 0.6em; | font-size: 0.6em; | ||
| 第58行: | 第94行: | ||
} | } | ||
/* 窄屏:改为两行 */ | /* ===== 窄屏:改为两行 ===== */ | ||
@media (max-width: 700px) { | @media (max-width: 700px) { | ||
.identifier { | .identifier { | ||
| 第64行: | 第100行: | ||
align-items: flex-start; | align-items: flex-start; | ||
gap: 6px; | gap: 6px; | ||
padding: 12px 20px; | |||
} | } | ||
.identifier__right { | .identifier__right { | ||
| 第70行: | 第107行: | ||
} | } | ||
} | } | ||
2026年9月29日 (二) 18:17的版本
/* ============================================
标识符通用样式
============================================ */
.identifier {
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
position: relative; /* 供四角绝对定位 */
width: 100%;
padding: 14px 24px; /* 内边距加大,给角字符留空间 */
gap: 12px;
font-size: 1rem;
line-height: 1.4;
border-radius: 4px;
margin: 6px 0;
}
/* ===== 四角符号 ===== */
.identifier__corner {
position: absolute;
font-size: 1.5em;
line-height: 1;
font-weight: 300;
color: currentColor;
opacity: 0.55;
/* 等宽字体让四个角形状更规整 */
font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
/* 稍微拉长纵向,视觉上更"框住" */
transform: scaleY(1.25);
transform-origin: center;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
.identifier__corner--tl {
top: 3px;
left: 6px;
}
.identifier__corner--tr {
top: 3px;
right: 6px;
}
.identifier__corner--bl {
bottom: 3px;
left: 6px;
}
.identifier__corner--br {
bottom: 3px;
right: 6px;
}
/* ===== 左侧:标识符名称 ===== */
.identifier__left {
font-weight: 800;
flex: 0 1 auto;
min-width: 0;
}
.identifier__left a {
color: inherit;
text-decoration: none;
}
.identifier__left a:hover {
text-decoration: underline;
}
/* ===== 右侧:描述 + 作者 ===== */
.identifier__right {
font-size: 0.6em;
display: flex;
align-items: center;
gap: 6px;
flex: 1 1 auto;
justify-content: flex-end;
text-align: right;
min-width: 0;
}
.identifier__author {
font-size: 1.8em;
font-weight: bold;
white-space: nowrap;
}
.identifier__author a {
color: inherit;
text-decoration: none;
}
.identifier__author a:hover {
text-decoration: underline;
}
/* ===== 窄屏:改为两行 ===== */
@media (max-width: 700px) {
.identifier {
flex-direction: column;
align-items: flex-start;
gap: 6px;
padding: 12px 20px;
}
.identifier__right {
justify-content: flex-start;
text-align: left;
}
}