Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <header>
	<h3 class="mayus centrar-texto">demo de tabs responsive</h3>
</header>
<form class="centrar espacio-contenido">
  <h4 class="izq-texto">
    En esta demo uso <a href="https://getbootstrap.com/components/#nav-tabs"> bootstrap.css nav_tabs </a> y <a href="https://getbootstrap.com/javascript/#tabs"> bootstrap.js tabs</a> y gracias al Plugin hecho por <a href="https://openam.github.io/bootstrap-responsive-tabs/index.html">openam</a> se logra el responsive de las tabs a acordion
  </h4>
	<ul class="nav nav-tabs responsive">
		<li class="active"><a href="#datos" role="tab" data-toggle="tab">Datos Cliente</a></li>
		<li><a href="#servicios" role="tab" data-toggle="tab">Servicios a Solicitar</a></li>
		<li><a href="#contenedor" role="tab" data-toggle="tab">Datos contenedor</a></li>
	</ul>
	<div class="tab-content responsive">
		<div class="espaciado tab-pane fade in active" id="datos">
		Lorem ipsum dolor sit amet, consectetur adipisicing elit. Impedit id assumenda veritatis quam suscipit officia! Numquam quam natus ratione, sapiente iure magni debitis consequatur, voluptate suscipit. Ab ex facilis iusto.		
		</div>
		<div class="espaciado tab-pane fade" id="servicios">
		Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolor reprehenderit facere aspernatur minus velit sunt, quam, atque porro voluptatem recusandae quaerat itaque voluptatibus repellendus, expedita eum cupiditate non dignissimos rem?
		</div>
		<div class=" espaciado tab-pane fade" id="contenedor">
		Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laboriosam molestiae magnam officiis repellat voluptate facere reiciendis temporibus, iure laudantium accusamus debitis, commodi pariatur atque. Iste cumque voluptatem, vitae neque nemo!
		</div>
	</div>
</form>
<hr>
<h4 class="centrar espacio-contenido izq-texto">
    y aca uso media query para detectar el tamaño y aplicar por medio de javascript hacer de las tabs un nav-icon.
</h4>
<br>
<nav class="centrar navbar navbar-default" role="navigation">
  <div class="container-fluid">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#menuServicio">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        </button>	
        <p class="navbar-brand">Menu de Servicios</p>
   	 </div>
	<div id="menuServicio" class="collapse navbar-collapse">
		<ul data-id ="menu" class="nav nav-tabs">
			<li class="active"><a href="#datos2" role="tab" data-toggle="tab">Datos Cliente</a></li>
			<li><a href="#servicios2" role="tab" data-toggle="tab">Servicios a Solicitar</a></li>
			<li><a href="#contenedor2" role="tab" data-toggle="tab">Datos del contenedor o carga suelta</a></li>
		</ul>
	</div>
  </div>
</nav>
<form class="centrar espacio-contenido">  
	<div class="tab-content">
		<div class="espaciado tab-pane fade in active" id="datos2">
		Lorem ipsum dolor sit amet, consectetur adipisicing elit. Impedit id assumenda veritatis quam suscipit officia! Numquam quam natus ratione, sapiente iure magni debitis consequatur, voluptate suscipit. Ab ex facilis iusto.		
		</div>
		<div class="espaciado tab-pane fade" id="servicios2">
		Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolor reprehenderit facere aspernatur minus velit sunt, quam, atque porro voluptatem recusandae quaerat itaque voluptatibus repellendus, expedita eum cupiditate non dignissimos rem?
		</div>
		<div class="espaciado tab-pane fade" id="contenedor2">
		Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laboriosam molestiae magnam officiis repellat voluptate facere reiciendis temporibus, iure laudantium accusamus debitis, commodi pariatur atque. Iste cumque voluptatem, vitae neque nemo!
		</div>
	</div>
 </form>
              
            
!

CSS

              
                *{
  padding:0;
  margin:0;
  box-sizing: border-box;  
}

html, body{
	background-color: whitesmoke;
	font-size:16px;
}

.centrar{
	margin: 0 auto;
	max-width: 1100px;
}

.centrar-texto{
	text-align: center;
}
.izq-texto{
  text-align: left;
}

.mayus{
  text-transform:uppercase;
  font-size:1.5rem;
}

.espaciado{
	padding: .5rem;
}

.espacio-contenido{
	padding-left: 2rem;
	padding-right: 1rem;
}

@media only screen and (max-width: 970px){
	h3, h4, span{
		font-size: 1.2rem !important;
	}
	html, body{
		font-size:.9rem;
	}
 	.centrar{
	margin: 0 auto;
	max-width: 770px;
	}
}

@media only screen and (max-width: 767px){
	h3, h4, span{
		font-size: 1.0rem !important;
	}
	html, body{
		font-size:.9rem;
	}
	.espacio-contenido{
	padding-left: .5rem;
	padding-right: .5rem;
	}
}

@media only screen and (min-width: 768px){
	.navbar-header{
		display: none;
	}
	.navbar-default{
		border: 0px;
	}
}
              
            
!

JS

              
                function valWindowSize() {
	"use strict";
  var width = $(window).width();
		if (width < 768) {
	  $('ul[data-id="menu"]').removeClass();
	  $('ul[data-id="menu"]').addClass('nav navbar-nav');
	} else {
	  $('ul[data-id="menu"]').removeClass();
	  $('ul[data-id="menu"]').addClass('nav nav-tabs');
	}
}


$(document).on('ready',function(){
  "use strict";
  //esto es lo que hace la magia de las tabs a acordion
	fakewaffle.responsiveTabs(['xs', 'sm']);
  
  //esto aca es lo que valida el tamaño para ver que estilo se le da las tabs
	$(window).on('resize', function () {
		valWindowSize();
	});
});

              
            
!
999px

Console