cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div class="container">

		<header>
			<h1>Flat CSS Accordeon</h1>
			<h2>Аккордеон на CSS в плоском стиле</h2>
		</header>

    <!-- accordeon with radio -->
    <div class="span">
      <h3>Based on radio-buttons</h3>
	<div class="accordeon radio">
		<label for="panel1">Panel 1</label>
		<input id="panel1" name="radio" type="radio" />
		<div class="panel">
		    <h1>Panel 1 Content</h1>
		    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et illo illum vel vero veniam blanditiis laboriosam animi labore atque accusantium amet excepturi voluptates perspiciatis doloribus ipsum harum nobis quam reiciendis.</p>
		</div>
		
		<label for="panel2">Panel 2</label>
		<input id="panel2" name="radio" type="radio" />
		<div class="panel">
		    <h1>Panel 2 Content</h1>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et illo illum vel vero veniam blanditiis laboriosam animi labore atque accusantium amet excepturi voluptates perspiciatis doloribus ipsum harum nobis quam reiciendis.</p>
		</div>
		
		<label for="panel3">Panel 3</label>
		<input id="panel3" name="radio" type="radio" />
		<div class="panel">
		    <h1>Panel 3 Content</h1>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et illo illum vel vero veniam blanditiis laboriosam animi labore atque accusantium amet excepturi voluptates perspiciatis doloribus ipsum harum nobis quam reiciendis.</p>
		</div>
      </div><!-- /.accordeon.radio -->
      
  </div><!-- /.span -->
  
    <!-- accordeon with checkbox -->
    <div class="span">
      <h3>Based on checkboxes</h3>
	<div class="accordeon check">
        <label for="panel4">Panel 1</label>
        <input id="panel4" type="checkbox" />
        <div class="panel">
            <h1>Panel 1 Content</h1>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et illo illum vel vero veniam blanditiis laboriosam animi labore atque accusantium amet excepturi voluptates perspiciatis doloribus ipsum harum nobis quam reiciendis.</p>
        </div>
        
        <label for="panel5">Panel 2</label>
        <input id="panel5" type="checkbox" />
        <div class="panel">
            <h1>Panel 2 Content</h1>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et illo illum vel vero veniam blanditiis laboriosam animi labore atque accusantium amet excepturi voluptates perspiciatis doloribus ipsum harum nobis quam reiciendis.</p>
        </div>
        
        <label for="panel6">Panel 3</label>
        <input id="panel6" type="checkbox" />
        <div class="panel">
            <h1>Panel 3 Content</h1>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et illo illum vel vero veniam blanditiis laboriosam animi labore atque accusantium amet excepturi voluptates perspiciatis doloribus ipsum harum nobis quam reiciendis.</p>
        </div>
      </div><!-- /.accordeon.check -->
      
    </div><!-- /.span -->
</div>
            
          
!
            
              /* Simple reset & Demo styles */
* {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #F5F5F5;
    color: #222;
}

.container {
  width: 800px;
  margin: 100px auto;
}

.container header {text-align: center;}

.container .span {
  float: left;
  width: 45%;
  padding: 2%;
}

/* Accordeon styling */
.accordeon {}

.accordeon label {
    display: block;
    padding: 1em;
    font-weight: 700;
    font-size: 1.5em;
    background: #16A085;
    color: #f5f5f5;
    cursor: pointer;
    border-bottom: 1px solid #1ABC9C;
}

.accordeon label:hover {
	background: #2fe2bf;
}

.accordeon .panel {
    height: 0;
    visibility: hidden;
    opacity: 0;
    background: #1ABC9C;
    color: #f0f0f0;
}

/* Hide checkboxes and radio-buttons */
.accordeon input[type="radio"], .accordeon input[type="checkbox"] {
    display: none;
}
/* Show .panel for corresponding to checked radio or checkbox */
.accordeon input[type="radio"]:checked + .panel, .accordeon input[type="checkbox"]:checked + .panel {
    height: auto;
    visibility: visible;
    opacity: 1;
    padding: 1.5em;
}
            
          
!
999px
Loading ..................

Console