模板:标识符/styles.css
来自ANACHRONISM
更多操作
< 模板:标识符
/* ============================================
标识符通用样式
============================================ */
.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;
}
}