跳转到内容
打开/关闭菜单
  • 451 条目
  • 808 文件
  • 22 用户
  • 9259 编辑
Blockland Wiki
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

模板:IdeologyCompass/styles.css

来自Blockland Wiki
KK​(留言 | 贡献)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;
}