 * {margin: 0; padding: 0;}
    .tree{width:27000px; margin:40px auto 0 auto}
    .tree ul {
        padding-top: 10px;
        position: relative;
        transition: all 0.5s;
        -webkit-transition: all 0.5s;
        -moz-transition: all 0.5s;
    }

    .tree li {
        float: left;
        text-align: center;
        list-style-type: none;
        position: relative;
        padding: 2px 1px 0 1px;
        transition: all 0.5s;
        -webkit-transition: all 0.5s;
        -moz-transition: all 0.5s;
    }

    /* 连接线样式 */
    .tree li::before, .tree li::after {
        content: '';
        position: absolute;
        top: 0;
        right: 50%;
        border-top: 1px solid #666;
        width: 50%;
        height: 10px;
    }
    .tree li::after {
        right: auto;
        left: 50%;
        border-left: 1px solid #666;
    }

    /* 单个子节点去掉连接线 */
    .tree li:only-child::after,
    .tree li:only-child::before {
        display: none;
    }

    /* 去掉第一个和最后一个的左右连接线 */
    .tree li:first-child::before,
    .tree li:last-child::after {
        border: 0 none;
    }

    /* 添加底部连接线到子级 */
    .tree li:last-child::before {
        border-right: 1px solid #666;
        border-radius: 0 5px 0 0;
    }
    .tree li:first-child::after {
        border-radius: 5px 0 0 0;
    }

    /* 父节点与子节点之间的竖线 */
    .tree ul ul::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        border-left: 1px solid #666;
        width: 0;
        height: 10px;
    }

    /* 姓名文字样式 */
    .tree li a {
         text-decoration: none;
    color: #666;
    font-family: "Microsoft YaHei", sans-serif; /* 更适合中文 */
    font-size: 13px;
    display: inline-block;
    writing-mode: vertical-rl;     /* 竖排文字：从右向左 */
    text-orientation: upright;     /* 保持汉字正立 */
    letter-spacing: 2px;           /* 可选：调整字间距 */
    line-height: 1.4;              /* 可选：改善垂直对齐 */
    white-space: nowrap;           /* 防止换行 */
    position: relative; /* 新增 */
    margin-top: 16px; /* 👈 新增：为箭头留空间 */
    }

    /* 可选：移除所有 hover 效果 */
    /*
    .tree li a:hover, .tree li a:hover+ul li a {
        background: #c8e4f8; color: #000; border: 1px solid #94a0b4;
    }
    .tree li a:hover+ul li::after,
    .tree li a:hover+ul li::before,
    .tree li a:hover+ul::before,
    .tree li a:hover+ul ul::before{
        border-color:  #94a0b4;
    }
    */
/* 子节点姓名上方显示箭头，表示传承方向 */
.tree ul ul li > a::before {
    content: '▼';
    display: block;
    position: absolute;
    bottom: 100%;       /* 👈 改为从底部定位 */
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    color: #666;
    line-height: 1;
    z-index: 1;
    margin-bottom: 2px; /* 👈 额外间距 */
}
