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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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="mbl plop">
  <button class="nav-button" type="button" role="button" aria-label="open/close navigation"><i></i></button>

<div class="mbl">
  <select class="select">
  <option value="valeur1">Salade</option>
  <option value="valeur2">Tomate</option>
  <option value="valeur3">Oignon</option>

<div class="arrow"></div>

<p>arrow down <i class="icon-arrow--down"></i></p>
<p>arrow up <i class="icon-arrow--up"></i></p>
<p>arrow right <i class="icon-arrow--right"></i></p>
<p>arrow left <i class="icon-arrow--left"></i></p>

<div class="tabs js-tabs">
  <nav class="tabs-menu">
    <a href="#tab1" class="tabs-menu-link is-active">Salade</a>
    <a href="#tab2" class="tabs-menu-link">Tomate</a>
    <a href="#tab3" class="tabs-menu-link">Oignons</a>

  <div class="tabs-content">
    <div id="tab1" class="tabs-content-item">Contenu 1. <br>Lorem Elsass Ipsum mitt picon bière munster du ftomi! Ponchour bisame. Bibbeleskaas jetz rossbolla sech choucroute un schwanz geburtstàg, Chinette dû, ìch bier deppfele schiesser.</div>
    <div id="tab2" class="tabs-content-item">Contenu 2. <br>Flammekueche de knèkes Seppele gal! a hopla geburtstàg, alles fraü Chulia Roberts oder knäckes dûû blottkopf. Noch bredele schissabibala, yeuh e schmutz.</div>
    <div id="tab3" class="tabs-content-item">Contenu 3. <br>E gewurtztraminer doch Carola schneck, schmutz a riesling de chambon eme rucksack Roger dû hopla geiss, jetz Chorchette de Scharrarbergheim.</div>

<table class="table table--zebra mtl" summary="">
	<caption>comparaison entre Grillade v6 et Grillade v7</caption>
			<th scope="col">Grillade v6</th>
			<th scope="col">Grillade v7</th>
			<th>Techno CSS employée</th>
			<td>Grid Layout</td>
			<th>Poids fichier CSS</th>
			<td>11 Ko</td>
			<td>3 Ko</td>
			<td>Edge 16+</td>
			<td>Mobile first<br>Largeurs fluides<br>Gouttières<br>Fusion de colonnes<br><del>Fusion de rangées</del><br>Gestion des écrans intermédiaires<br><del>Tailles d'enfants responsive</del><br>Ordonnancement des enfants</td>
			<td>Mobile first<br>Largeurs fluides<br>Gouttières<br>Fusion de colonnes<br>Fusion de rangées<br>Gestion des écrans intermédiaires<br>Tailles d'enfants responsive<br>Ordonnancement des enfants</td>

<section class="grid-6-small-3 has-gutter">
  <div class="item-first">(3) item-first</div>
  <div class="col-3-small-2">col-3-small-2</div>
  <div class="col-2-small-1">col-2-small-1</div>
  <div class="col-2-small-1">col-2-small-1</div>
  <div class="col-4-small-2">col-4-small-2</div>
  <div class="row-2">row-2</div>
  <div class="col-3">col-3</div>
  <div class="col-all">col-all</div>
              body {
  padding: 2rem;
[class*=grid] > * {
  background: pink;
.plop.is-opened {
  background: pink;
 Manages tabs with content

(function($) {

  $.tabs = function(el, options) {

    // Default settings values
    var defaults = {
      selectorLinks: '.tabs-menu-link',
      selectorList: '.tabs-menu',
      selectorListItems: 'li',
      selectorContent: '.tabs-content-item',
      classActive: 'is-active'

    var plugin = this;

    plugin.settings = {};

    var $element = $(el),
      element = el;

    // Plugin initialization
    plugin.init = function() {
      plugin.settings = $.extend({}, defaults, options);

    // Reads plugin settings from HTML data-* attributes (camelCase)
    var updateSettingsFromHTMLData = function() {
      var data = $element.data();
      for (var dat in data) plugin.settings[dat] = data[dat];

    // Set initial ARIA attributes on elements
    var setAriaAttributes = function() {
      $(plugin.settings.selectorList,$element).attr('role','tablist').find(plugin.settings.selectorListItems).attr('role','presentation').find(plugin.settings.selectorLinks).attr({'role':'tab','tabindex':'-1'}).each(function(index,item) {
        var target = $(this).attr('href');
        // If the link is marked active with the class, then tabindex 0
        if($(this).hasClass(plugin.settings.classActive)) {
        // Establish relationships between tabs (links) and tabpanels

    // Set event handlers on HTML elements (private method)
    var registerEvents = function() {
      // Navigate with clicks
      $(plugin.settings.selectorLinks,$element).off('click.tabs').on('click.tabs', function(e) {
      // Navigate with arrow keys
      }).off('keydown.tabs').on('keydown.tabs', function(e) {
        if(e.metaKey || e.altKey) return; // Do not react with modifier keys
        switch (e.keyCode) {
          case 37:
          case 38:
          case 39:
          case 40:

    // Switch active classes for tabs (public method)
    plugin.switchClasses = function($el) {
      // Other elements
      // Current element

    // Switch active classes for content panels (public method)
    plugin.switchContent = function(targetId) {
      var $target;
      // Other elements
      // Target element
      if(targetId) {
        $target = $(targetId,$element);
      } else {
        $target = $(plugin.settings.selectorContent,$element).first();

    // Switch to next tab
    plugin.nextTab = function() {

    // Switch to next tab
    plugin.prevTab = function() {

    // Switch to prev/next tab
    plugin.goTab = function(direction) {
      var $current = $(plugin.settings.selectorLinks,$element).filter('.'+plugin.settings.classActive);
      var $links = $(plugin.settings.selectorLinks,$element);
      var eq = $links.index($current)+direction;
      if(eq<0) return; // Prevent backward focus on last element
      var $next = $links.eq(eq);

    // Initialization


  $.fn.tabs = function(options) {

    return this.each(function() {
      if (undefined === $(this).data('tabs')) {
        var plugin = new $.tabs(this, options);
        $(this).data('tabs', plugin);


  $(document).ready(function() {
    // Launch plugin on target element


Navigation Button Toggle class
(function() {

// old browser or not ?
if ( !('querySelector' in document && 'addEventListener' in window) ) {
window.document.documentElement.className += ' js-enabled';

function toggleNav() {

// Define targets by their class or id
var button = document.querySelector('.nav-button');
var target = document.querySelector('.plop');

// click-touch event
if ( button ) {
  function (e) {
  }, false );
} // end toggleNav()

🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................