Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- .tabs {
- overflow: hidden;
- margin-bottom: 30px;
- }
- .tabs input {
- position: absolute;
- opacity: 0;
- z-index: -1;
- }
- .tab {
- width: 100%;
- color: white;
- overflow: hidden;
- }
- .tab-label {
- display: flex;
- justify-content: space-between;
- padding: 1em;
- background: #e4e7e9;
- font-weight: bold;
- cursor: pointer;
- color: #54626d;
- /* Icon */
- }
- .tab-label:hover {
- background: #ebeff3;
- }
- .tab-label::after {
- content: "❯";
- width: 1em;
- height: 1em;
- text-align: center;
- transition: all 0.35s;
- }
- .tab-content {
- max-height: 0;
- padding: 0 1em;
- color: #2c3e50;
- background: white;
- transition: all 0.35s;
- text-align: left;
- }
- .tab-close {
- display: flex;
- justify-content: flex-end;
- padding: 0.8em;
- font-size: 0.75em;
- background: #2c3e50;
- cursor: pointer;
- }
- .tab-close:hover {
- background: #1a252f;
- }
- input:checked + .tab-label {
- background: #ebeff3;
- }
- input:checked + .tab-label::after {
- transform: rotate(90deg);
- }
- input:checked ~ .tab-content {
- max-height: 100vh;
- padding: 1em;
- }
- </style>
- <div class="tabs">
- <div class="tab">
- <input type="checkbox" id="chck1">
- <label class="tab-label" for="chck1">Item 1</label>
- <div class="tab-content">
- Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ipsum, reiciendis!
- </div>
- </div>
- <div class="tab">
- <input type="checkbox" id="chck2">
- <label class="tab-label" for="chck2">Item 2</label>
- <div class="tab-content">
- Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
- </div>
- </div>
- <div class="tab">
- <input type="checkbox" id="chck3">
- <label class="tab-label" for="chck3">Item 3</label>
- <div class="tab-content">
- Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
- </div>
- </div>
- <div class="tab">
- <input type="checkbox" id="chck4">
- <label class="tab-label" for="chck4">Item 4</label>
- <div class="tab-content">
- Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
- </div>
- </div>
- <div class="tab">
- <input type="checkbox" id="chck5">
- <label class="tab-label" for="chck5">Item 5</label>
- <div class="tab-content">
- Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
- </div>
- </div>
- <div class="tab">
- <input type="checkbox" id="chck6">
- <label class="tab-label" for="chck6">Item 6</label>
- <div class="tab-content">
- Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
- </div>
- </div>
- <div class="tab">
- <input type="checkbox" id="chck7">
- <label class="tab-label" for="chck7">Item 8</label>
- <div class="tab-content">
- Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
- </div>
- </div>
- <div class="tab">
- <input type="checkbox" id="chck9">
- <label class="tab-label" for="chck9">Item 9</label>
- <div class="tab-content">
- Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
- </div>
- </div>
- <div class="tab">
- <input type="checkbox" id="chck10">
- <label class="tab-label" for="chck10">Item 10</label>
- <div class="tab-content">
- Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
- </div>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement