Advertisement
lazaqq

FAQ BO

Jun 30th, 2021
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.57 KB | None | 0 0
  1. <style>
  2.  
  3. .tabs {
  4.   overflow: hidden;
  5.   margin-bottom: 30px;
  6. }
  7.  
  8. .tabs input {
  9.   position: absolute;
  10.   opacity: 0;
  11.   z-index: -1;
  12. }
  13.  
  14. .tab {
  15.   width: 100%;
  16.   color: white;
  17.   overflow: hidden;
  18. }
  19. .tab-label {
  20.   display: flex;
  21.   justify-content: space-between;
  22.   padding: 1em;
  23.   background: #e4e7e9;
  24.   font-weight: bold;
  25.   cursor: pointer;
  26.   color: #54626d;
  27.   /* Icon */
  28. }
  29. .tab-label:hover {
  30.   background: #ebeff3;
  31. }
  32. .tab-label::after {
  33.   content: "❯";
  34.   width: 1em;
  35.   height: 1em;
  36.   text-align: center;
  37.   transition: all 0.35s;
  38. }
  39. .tab-content {
  40.   max-height: 0;
  41.   padding: 0 1em;
  42.   color: #2c3e50;
  43.   background: white;
  44.   transition: all 0.35s;
  45.   text-align: left;
  46. }
  47. .tab-close {
  48.   display: flex;
  49.   justify-content: flex-end;
  50.   padding: 0.8em;
  51.   font-size: 0.75em;
  52.   background: #2c3e50;
  53.   cursor: pointer;
  54. }
  55. .tab-close:hover {
  56.   background: #1a252f;
  57. }
  58.  
  59. input:checked + .tab-label {
  60.   background: #ebeff3;
  61. }
  62. input:checked + .tab-label::after {
  63.   transform: rotate(90deg);
  64. }
  65. input:checked ~ .tab-content {
  66.   max-height: 100vh;
  67.   padding: 1em;
  68. }
  69.  
  70. </style>
  71.  
  72. <div class="tabs">
  73.       <div class="tab">
  74.         <input type="checkbox" id="chck1">
  75.         <label class="tab-label" for="chck1">Item 1</label>
  76.         <div class="tab-content">
  77.           Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ipsum, reiciendis!
  78.         </div>
  79.       </div>
  80.      
  81.       <div class="tab">
  82.         <input type="checkbox" id="chck2">
  83.         <label class="tab-label" for="chck2">Item 2</label>
  84.         <div class="tab-content">
  85.           Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
  86.         </div>
  87.       </div>
  88.      
  89.       <div class="tab">
  90.         <input type="checkbox" id="chck3">
  91.         <label class="tab-label" for="chck3">Item 3</label>
  92.         <div class="tab-content">
  93.           Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
  94.         </div>
  95.       </div>
  96.      
  97.       <div class="tab">
  98.         <input type="checkbox" id="chck4">
  99.         <label class="tab-label" for="chck4">Item 4</label>
  100.         <div class="tab-content">
  101.           Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
  102.         </div>
  103.       </div>     
  104.      
  105.       <div class="tab">
  106.         <input type="checkbox" id="chck5">
  107.         <label class="tab-label" for="chck5">Item 5</label>
  108.         <div class="tab-content">
  109.           Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
  110.         </div>
  111.       </div>     
  112.      
  113.       <div class="tab">
  114.         <input type="checkbox" id="chck6">
  115.         <label class="tab-label" for="chck6">Item 6</label>
  116.         <div class="tab-content">
  117.           Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
  118.         </div>
  119.       </div>     
  120.      
  121.       <div class="tab">
  122.         <input type="checkbox" id="chck7">
  123.         <label class="tab-label" for="chck7">Item 8</label>
  124.         <div class="tab-content">
  125.           Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
  126.         </div>
  127.       </div>   
  128.      
  129.       <div class="tab">
  130.         <input type="checkbox" id="chck9">
  131.         <label class="tab-label" for="chck9">Item 9</label>
  132.         <div class="tab-content">
  133.           Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
  134.         </div>
  135.       </div>     
  136.      
  137.       <div class="tab">
  138.         <input type="checkbox" id="chck10">
  139.         <label class="tab-label" for="chck10">Item 10</label>
  140.         <div class="tab-content">
  141.           Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!
  142.         </div>
  143.       </div>
  144.      
  145. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement