JSFiddle - React, Tailwind, and code Playground
by Lance Bitner
HTML
<div class="w3c">
<div id="tab16">
<a href="#tab16">Tab 16</a>
<div>
<div class="tab">
<input id="tab-one" type="checkbox" name="tabs">
<label for="tab-one">Introduction to SharePoint</label>
<div class="tab-content">
<div>
<div class="column2">
<a href=""><img src="../images/classroom1.png"></a>
<a href=""><img src="../images/document1.png"></a>
<a href=""><img src="../images/presentation1.png"></a>
<a href=""><img src="../images/video1.png"></a>
</div>
</div>
</div>
</div>
<div class="tab">
<input id="tab-two" type="checkbox" name="tabs">
<label for="tab-two">Label Two</label>
<div class="tab-content">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tenetur, architecto, explicabo perferendis nostrum, maxime impedit atque odit sunt pariatur illo obcaecati soluta molestias iure facere dolorum adipisci eum? Saepe, itaque.</p>
</div>
</div>
<div class="tab">
<input id="tab-three" type="checkbox" name="tabs">
<label for="tab-three">Label Three</label>
<div class="tab-content">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tenetur, architecto, explicabo perferendis nostrum, maxime impedit atque odit sunt pariatur illo obcaecati soluta molestias iure facere dolorum adipisci eum? Saepe, itaque.</p>
</div>
</div>
</div>
</div>
<div id="tab17">
<a href="#tab17">Tab 17</a>
<div>... 30 lines of CSS is rather a lot, and...</div>
</div>
<div id="tab18">
<a href="#tab18">Tab 18</a>
<div>... that 2 should have been enough, but...</div>
</div>
</div>
CSS
/* Acordeon styles */
.tab1 {
position: relative;
margin-bottom: 1px;
width: 100%;
color: #0072c6;
overflow: hidden;
}
.tab1 p {
color: black;
}
.tab > input {
position: absolute;
opacity: 0;
}
.tab > label {
position: relative;
display: block;
padding: 0 0 0 1em;
/*background-color:aliceblue;
font-weight: bold;*/
line-height: 3;
cursor: pointer;
}
.blue label {
background: #2980b9;
}
.tab-content {
max-height: 0;
overflow: hidden;
background: white;
-webkit-transition: max-height .35s;
-o-transition: max-height .35s;
transition: max-height .35s;
}
.blue .tab-content {
background: #3498db;
}
.tab-content p {
margin: 1em;
}
.tab > input:checked ~ .tab-content {
max-height: 100%;
}
.tab > label::after {
position: absolute;
left: -20px;
top: -9px;
display: block;
width: 3em;
height: 3em;
line-height: 3em;
text-align: center;
-webkit-transition: all .35s;
-o-transition: all .35s;
transition: all .35s;
}
.tab > input[type=checkbox] + label::after {
content: " + ";
font-size: 18px;
font-weight: 900;
}
.tab > input[type=radio] + label::after {
content: " \25BC ";
}
.tab > input[type=checkbox]:checked + label::after {
transform: rotate(315deg);
}
.tab > input[type=radio]:checked + label::after {
transform: rotateX(180deg);
}
.row {
background-color: white;
}
.ms-srch-sb {
min-width: 150px !important;
}
.page-wrap {
width: 80%;
margin: 0 auto;
}
input[type="radio"] {
position: absolute;
top: -9999px;
left: -9999px;
}
.tab-wrap {
width: 100%;
float: none;
list-style: none;
position: relative;
margin: 0 auto;
padding: 0;
text-align: left;
}
.tab-wrap li {
float: left;
display: block;
}
.tab-wrap label {
position: relative;
display: inline-block;
padding: 1.5em 1.5em 1em;
color: inherit;
text-decoration: none;
margin: 0 10px 0 0px;
}
/*
.label-1 {
z-index: 100;
}
.label-2 {
z-index: 90;
}
.label-3 {
z-index:...