此样式是在@Hardy的指导下完成的,特此致谢~~~
.node[mystyle~='康奈尔']:not(.node-foldup) {
> .node-btn {
opacity: 0;
&:hover {
opacity: 1;
transition: all 0.3s;
}
}
> .node-head {
> .node-text, > .node-text:focus {
text-align: center;
background-color: var(--info) !important;
font-size: 24px;
color: #fff;
margin-left: 14px;
margin-right: 0px;
border-top-right-radius: 5px;
border-top-left-radius: 5px;
}
}
> .node-child {
display: flex;
flex-wrap: wrap;
border: 1px solid var(--table-border);
padding-left: 0px;
> .node:first-child {
flex-shrink: 0;
min-width: 150px;
flex-basis: 25%;
border-right: 1px solid var(--table-border);
> .node-btn {
display: none;
}
}
> .node {
> .node-head {
> .node-text {
margin-left: 0px;
padding-left: 25px;
color: var(--info);
font-weight: 800;
}
}
> .node-child {
border: none !important;
padding-left: 0px;
}
}
> .node:nth-child(2) {
flex-grow: 1;
max-width:75%;
}
> .node:last-child {
flex-basis: 100%;
border-top: 1px solid var(--table-border);
> .node-btn {
display: none;
}
}
}
}
效果图: