测试:对话框/style.css
来自EaseCation Wiki
更多操作
< 测试:对话框
/* MC风格对话框模板样式 */
.mc-dialog {
display: flex;
align-items: center;
gap: 0;
margin: 8px 0;
font-family: 'Minecraft', 'Unifont', 'Zpix', monospace;
flex-wrap: nowrap;
}
/* 左侧:头像 + 名牌 */
.mc-dialog-info {
display: flex;
align-items: center;
gap: 6px;
flex-shrink: 0;
}
/* 头像 */
.mc-dialog-avatar {
width: 32px;
height: 32px;
image-rendering: pixelated;
image-rendering: crisp-edges;
flex-shrink: 0;
}
/* 名牌文字区域 */
.mc-dialog-text-stack {
display: flex;
flex-direction: column;
justify-content: center;
gap: 2px;
}
/* 玩家名称 */
.mc-dialog-name {
color: #FFFFFF;
font-size: 14px;
font-weight: bold;
line-height: 1.2;
white-space: nowrap;
text-shadow:
2px 2px 0 #3F3F3F,
-1px -1px 0 #3F3F3F,
1px -1px 0 #3F3F3F,
-1px 1px 0 #3F3F3F,
1px 1px 0 #3F3F3F;
}
/* 绿条容器 */
.mc-dialog-bar-bg {
width: 80px;
height: 5px;
background-color: #3F3F3F;
border: 1px solid #1F1F1F;
overflow: hidden;
}
/* 绿条填充 */
.mc-dialog-bar-fill {
height: 100%;
background-color: #55FF55;
}
/* 右侧对话气泡 */
.mc-dialog-bubble {
display: inline-block;
background-color: rgba(0, 0, 0, 0.7);
padding: 6px 12px;
margin-left: 8px;
color: #FFFFFF;
font-size: 14px;
line-height: 1.4;
text-shadow:
2px 2px 0 #3F3F3F,
-1px -1px 0 #3F3F3F,
1px -1px 0 #3F3F3F,
-1px 1px 0 #3F3F3F,
1px 1px 0 #3F3F3F;
position: relative;
flex-shrink: 1;
min-width: 0;
word-break: break-word;
}
/* 对话气泡左侧小三角 */
.mc-dialog-bubble::before {
content: "";
position: absolute;
left: -8px;
top: 50%;
transform: translateY(-50%);
border-width: 6px 8px 6px 0;
border-style: solid;
border-color: transparent rgba(0, 0, 0, 0.7) transparent transparent;
}
/* 深色模式适配 */
html.skin-theme-clientpref-night .mc-dialog-bubble {
background-color: rgba(40, 40, 40, 0.85);
}
html.skin-theme-clientpref-night .mc-dialog-bubble::before {
border-color: transparent rgba(40, 40, 40, 0.85) transparent transparent;
}
@media (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .mc-dialog-bubble {
background-color: rgba(40, 40, 40, 0.85);
}
html.skin-theme-clientpref-os .mc-dialog-bubble::before {
border-color: transparent rgba(40, 40, 40, 0.85) transparent transparent;
}
}