模板:IdeologyCompass/styles.css:修订间差异
来自Blockland Wiki
更多操作
无编辑摘要 标签:已被回退 |
无编辑摘要 标签:手工回退 |
||
| 第1行: | 第1行: | ||
/* | /* 容器:卡片式设计 */ | ||
.ideology-compass { | |||
display: block; | |||
. | |||
position: relative; | position: relative; | ||
width: 100%; | |||
height: 0; | |||
padding-bottom: 100%; | |||
box-sizing: border-box; | |||
/* 背景透明 */ | |||
background-color: transparent; | |||
/* 字体优化:回退到安全字体 */ | |||
font-family: sans-serif; | |||
font-weight: bold; | |||
margin: 0 auto; | |||
font- | |||
/* ==== 修复 1:把变量改成简单的十六进制颜色 ==== */ | |||
font-weight: | /* 原来的写法被拦截了,现在用纯灰色 (#eeeeee) 画网格,安全稳过 */ | ||
background-image: | |||
linear-gradient(to right, #eeeeee 1px, transparent 1px), | |||
linear-gradient(to bottom, #eeeeee 1px, transparent 1px); | |||
/* | background-size: 20% 20%; | ||
background-position: center; | |||
} | } | ||
/* | /* 坐标轴:Y轴 (中心竖线) */ | ||
. | .ideology-compass::before { | ||
content: ''; | |||
position: absolute; | |||
top: 5%; | |||
bottom: 5%; | |||
left: 50%; | |||
width: 2px; | |||
/* 修复:用简单的颜色 */ | |||
background: #333333; | |||
opacity: 0.5; | |||
transform: translateX(-50%); | |||
z-index: 0; | |||
} | } | ||
. | /* 坐标轴:X轴 (中心横线) */ | ||
background: | .ideology-compass::after { | ||
content: ''; | |||
position: absolute; | |||
left: 5%; | |||
right: 5%; | |||
top: 50%; | |||
height: 2px; | |||
/* 修复:用简单的颜色 */ | |||
background: #333333; | |||
opacity: 0.5; | |||
transform: translateY(-50%); | |||
z-index: 0; | |||
} | } | ||
. | /* 轴线标签 */ | ||
.compass-label { | |||
position: absolute; | |||
font-size: 0.75em; | font-size: 0.75em; | ||
font-weight: 800; | |||
text-transform: uppercase; | text-transform: uppercase; | ||
letter-spacing: | letter-spacing: 1px; | ||
color: #888888; | |||
/* ==== 修复 2:删掉了 pointer-events: none; (这是第54行的报错原因) ==== */ | |||
text-shadow: 0 0 2px #ffffff; | |||
z-index: 1; | |||
} | } | ||
. | .compass-label.top { top: 0; left: 50%; transform: translateX(-50%); } | ||
.compass-label.bottom { bottom: 0; left: 50%; transform: translateX(-50%); } | |||
/* 旋转文字需要 block 属性支持 */ | |||
} | .compass-label.left { top: 50%; left: 0; transform: translateY(-50%) rotate(-90deg); display: block; } | ||
.compass-label.right { top: 50%; right: 0; transform: translateY(-50%) rotate(90deg); display: block; } | |||
/* | /* 定位点容器 */ | ||
. | .compass-point { | ||
position: absolute; | |||
transform: translate(-50%, -50%); | |||
display: flex; | display: flex; | ||
flex-direction: column; | |||
align-items: center; | |||
justify-content: center; | |||
z-index: 10; | |||
width: auto; | |||
} | } | ||
. | /* 那个点 */ | ||
width: | .compass-dot { | ||
display: block; | |||
width: 14px; | |||
height: 14px; | |||
background-color: #3366cc; /* 默认蓝 */ | |||
border: 2px solid #ffffff; | |||
border-radius: 50%; | |||
box-shadow: 0 0 8px rgba(0,0,0,0.3); | |||
} | } | ||
/* 文字标签:气泡风格 */ | |||
.compass-text { | |||
display: block; | |||
margin-top: 6px; | |||
/* | |||
. | |||
font-size: 0.8em; | font-size: 0.8em; | ||
font-weight: bold; | font-weight: bold; | ||
padding: 2px 6px; | |||
background-color: #ffffff; | |||
border | border: 1px solid #cccccc; | ||
border-radius: 10px; | |||
box-shadow: 0 2px 4px rgba(0,0,0,0.1); | |||
/* 防止文字竖排爆炸 */ | |||
white-space: nowrap; | |||
} | } | ||
2026年2月11日 (三) 15:36的最新版本
/* 容器:卡片式设计 */
.ideology-compass {
display: block;
position: relative;
width: 100%;
height: 0;
padding-bottom: 100%;
box-sizing: border-box;
/* 背景透明 */
background-color: transparent;
/* 字体优化:回退到安全字体 */
font-family: sans-serif;
font-weight: bold;
margin: 0 auto;
/* ==== 修复 1:把变量改成简单的十六进制颜色 ==== */
/* 原来的写法被拦截了,现在用纯灰色 (#eeeeee) 画网格,安全稳过 */
background-image:
linear-gradient(to right, #eeeeee 1px, transparent 1px),
linear-gradient(to bottom, #eeeeee 1px, transparent 1px);
background-size: 20% 20%;
background-position: center;
}
/* 坐标轴:Y轴 (中心竖线) */
.ideology-compass::before {
content: '';
position: absolute;
top: 5%;
bottom: 5%;
left: 50%;
width: 2px;
/* 修复:用简单的颜色 */
background: #333333;
opacity: 0.5;
transform: translateX(-50%);
z-index: 0;
}
/* 坐标轴:X轴 (中心横线) */
.ideology-compass::after {
content: '';
position: absolute;
left: 5%;
right: 5%;
top: 50%;
height: 2px;
/* 修复:用简单的颜色 */
background: #333333;
opacity: 0.5;
transform: translateY(-50%);
z-index: 0;
}
/* 轴线标签 */
.compass-label {
position: absolute;
font-size: 0.75em;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 1px;
color: #888888;
/* ==== 修复 2:删掉了 pointer-events: none; (这是第54行的报错原因) ==== */
text-shadow: 0 0 2px #ffffff;
z-index: 1;
}
.compass-label.top { top: 0; left: 50%; transform: translateX(-50%); }
.compass-label.bottom { bottom: 0; left: 50%; transform: translateX(-50%); }
/* 旋转文字需要 block 属性支持 */
.compass-label.left { top: 50%; left: 0; transform: translateY(-50%) rotate(-90deg); display: block; }
.compass-label.right { top: 50%; right: 0; transform: translateY(-50%) rotate(90deg); display: block; }
/* 定位点容器 */
.compass-point {
position: absolute;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 10;
width: auto;
}
/* 那个点 */
.compass-dot {
display: block;
width: 14px;
height: 14px;
background-color: #3366cc; /* 默认蓝 */
border: 2px solid #ffffff;
border-radius: 50%;
box-shadow: 0 0 8px rgba(0,0,0,0.3);
}
/* 文字标签:气泡风格 */
.compass-text {
display: block;
margin-top: 6px;
font-size: 0.8em;
font-weight: bold;
padding: 2px 6px;
background-color: #ffffff;
border: 1px solid #cccccc;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
/* 防止文字竖排爆炸 */
white-space: nowrap;
}