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 data-ng-controller="FlexboxCtrl as $ctrl" class="container">
  <h2>Wrapper <code>align-content: <span class="pre" data-ng-bind="$ctrl.class.text"></span>;</code></h2>
  <div class="sample-wrapper {{$ctrl.class.class}}">
              $blue: #3863A0;
$green: #3DBE8B;
$props: 'flex-start' 'flex-end' 'center' 'stretch' 'space-around' 'space-between';
  text-align: left;
  margin-bottom: 30px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  counter-reset: elements;
  border: dashed 4px #A9A9A9;
  color: white;
  transition: all 400ms linear;
  min-height: 400px;
  @each $val in $props {
      align-content: #{$val};
  > div {
    text-align: center;
    min-height: 50px;    
    line-height: 50px; 
    @for $i from 1 to 11{
        margin: 15px;
        @if $i < 6 {
          $darken: $i * 5% - 5;
          background: darken($blue, $darken);
          width: (200px * ($i * 0.2));
        } @else {
          $j: $i - 5;
          $darken: $j * 5% - 5;
          background: darken($green, $darken);
          width: (200px * ($j * 0.2));

      counter-increment: elements;
      content: counter(elements);
  'use strict';
  // Define app and elements
  angular.module("flexbox", ['ngSanitize'])
    // Flexbox controller (called from the component)
    .controller('FlexboxCtrl', FlexboxCtrl);

  // Dependencies injections
  FlexboxCtrl.$inject = ['$interval'];

  // Flexbox controller (hoists)
  function FlexboxCtrl($interval){
    var $ctrl = this,
        index = 0,
        speed = 4000,
        classes = [
          {text: 'flex-start', class: 'align-content-flex-start'},
          {text: 'flex-end', class: 'align-content-flex-end'},
          {text: 'center', class: 'align-content-center'},
          {text: 'stretch', class: 'align-content-stretch'},
          {text: 'space-around', class: 'align-content-space-around'},
          {text: 'space-between', class: 'align-content-space-between'}
        length = classes.length - 1;
    $ctrl.class = classes[index];
    $interval(timer, speed);
    function timer(){
      index = (length === index) ? 0 : index + 1;
      $ctrl.class = classes[index];
  // Run app
  angular.bootstrap(document, ['flexbox']);

Loading ..................