Template:Tabs/styles.css:修订间差异

来自NeuroWiki
跳转到导航 跳转到搜索
无编辑摘要
标签已被回退
无编辑摘要
标签已被回退
第13行: 第13行:


.tab-button {
.tab-button {
    position: relative;
}
.tab-button input[type="radio"] {
    display: none;
}
.tab-button label {
     padding: 10px 20px;
     padding: 10px 20px;
     cursor: pointer;
     cursor: pointer;
第20行: 第28行:
     border: 1px solid #ccc;
     border: 1px solid #ccc;
     border-bottom: none;
     border-bottom: none;
    text-decoration: none;
     transition: background-color 0.3s, color 0.3s;
     transition: background-color 0.3s, color 0.3s;
}
}


.tab-button:hover {
.tab-button label:hover {
     background-color: #e0e0ff;
     background-color: #e0e0ff;
     color: #000;
     color: #000;
第30行: 第37行:


/* 选中的标签按钮高亮 */
/* 选中的标签按钮高亮 */
.tab-button:target {
.tab-button input[type="radio"]:checked + label {
     background-color: #0078d7;
     background-color: #0078d7;
     color: white;
     color: white;
第47行: 第54行:
}
}


.tab-content:target {
.tab-button input[type="radio"]:checked ~ .tabs-contents .tab-content {
     display: block;
     display: block;
}
}

2025年3月1日 (六) 19:38的版本

/* 标签容器整体样式 */
.tabs-container {
    font-family: Arial, sans-serif;
    margin: 20px;
}

/* 标签按钮样式 */
.tabs-buttons {
    display: flex;
    border-bottom: 2px solid #ccc;
    margin-bottom: 10px;
}

.tab-button {
    position: relative;
}

.tab-button input[type="radio"] {
    display: none;
}

.tab-button label {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    background-color: #f8f8ff;
    border: 1px solid #ccc;
    border-bottom: none;
    transition: background-color 0.3s, color 0.3s;
}

.tab-button label:hover {
    background-color: #e0e0ff;
    color: #000;
}

/* 选中的标签按钮高亮 */
.tab-button input[type="radio"]:checked + label {
    background-color: #0078d7;
    color: white;
    border-bottom: 2px solid #0078d7;
}

/* 标签内容样式 */
.tabs-contents {
    border: 1px solid #ccc;
    background-color: #f8f8ff;
    padding: 20px;
}

.tab-content {
    display: none;
}

.tab-button input[type="radio"]:checked ~ .tabs-contents .tab-content {
    display: block;
}