Pen Settings

HTML

CSS

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.

+ add another resource

JavaScript

Babel includes JSX processing.

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.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <section class="content-wrapper">
<ul id="accordion">
    <li class="acc-item">
        <div class="acc-item_content">
            <h3>Image one</h3>
            <p>Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment.</p>
        </div>
    </li>
    <li class="acc-item">
        <div class="acc-item_content">
            <h3>Image two</h3>
            <p>Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring.

        </p>
        </div>
    </li>
    <li class="acc-item">
        <div class="acc-item_content">
            <h3>Image three</h3>
            <p>Capitalise on low hanging fruit to identify a ballpark value added activity to beta test. Override the digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing solely on the bottom line.</p>
        </div>
    </li>
    <li class="acc-item">
        <div class="acc-item_content">
            <h3>Image four</h3>
            <p>Podcasting operational change management inside of workflows to establish a framework. Taking seamless key performance indicators offline to maximise the long tail. Keeping your eye on the ball while performing a deep dive on the start-up mentality to derive convergence on cross-platform integration.</p>
        </div>
    </li>
</ul>

</section>

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700');

body {
  font-family:"Open Sans", sans-serif;
  background: #222;
  margin: 0;
  padding: 0;
}
.content-wrapper {
  width: 50%;
  padding: 50px;
  margin: 0 auto;
  background-color: rgba(0,0,0,0.2);
  color: #FFF;
}

#accordion {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.acc-item {
  width: 100%;
  height: 100px; 
  position: relative;
  transition: height 400ms;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.acc-item:after {
  position: absolute;
  top: 0;
  right: 20px;
  font-size: 48px;
  content: "-";
  color: white;
  font-weight: bolder;
  transition: transform 400ms;
}

.acc-item:hover {
  height: 400px;
}

.acc-item:hover:after {
  transform: rotate(-90deg);
}

.acc-item:hover .acc-item_content{
  visibility: visible;
  opacity: 1;
}

.acc-item_content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  padding: 20px;
  background: rgba(0,0,0,0.40);
  bottom: 10px;
  left: 10px;
  width: 66%;
  color: #FFF;

  transition: all 300ms ease-in-out;
}

.acc-item_content h3 {
  font-weight: 700;
    margin: 0 0 10px 0;
}

.acc-item_content p {
  margin: 0;
  font-weight: 100;
}


.acc-item:nth-child(1) {
  background-image: url("https://unsplash.it/1500/1000?random");
}

.acc-item:nth-child(2) {
  background-image: url("https://unsplash.it/1501/1001?random");
}
.acc-item:nth-child(3) {
  background-image: url("https://unsplash.it/1502/1002?random");
}
.acc-item:nth-child(4) {
  background-image: url("https://unsplash.it/1503/1003?random");
}

@media (max-width: 600px){
  .content-wrapper {
    width: 100%;
    padding: 0 0 50px 0;
  }

  .content-wrapper > h3 {
  margin: 50px 15px 0 15px;
}

.content-wrapper > p {
  margin: 10px 15px 0 15px;
}
}

              
            
!

JS

              
                
              
            
!
999px

Console